cnvdasm - ultima underworld conversation script disassembler / decompiler

loading game strings

could not load code ...
conversation #2
string block 0x0e01, name goblin

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_074a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[5];

   locals[1] = 1;
   print( 1, &locals[1] );
   say( "Help us! Oh, by the Titan, human, thou must help us! That thing is loose in the tower, it is killing us!" );
   locals[2] = 15;
   locals[3] = 15;
   locals[4] = 10001;
   locals[5] = x_clock( 2, &locals[4], &locals[3] ) + 1;
   x_clock( 2, &locals[5], &locals[2] );
   func_0156();
} // end func

void func_03a5() {

   int locals[22];

   say( "Yes?" );
   locals[1] = 4;
   locals[2] = 5;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_03ed();
   break;

   case 2:

      func_0469();
   break;

   } // end switch

} // end func

void func_03ed() {

   int locals[22];

   say( "What duty hast thou here? The tower is empty now!" );
   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0435();
   break;

   case 2:

      func_0110();
   break;

   } // end switch

} // end func

void func_0435() {

   int locals[22];

   say( "Go where thou wilt! Since Bishop took his own life, there is nothing to guard, and no reason to stop thee." );
   locals[1] = 10;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0147();
   } // end if

} // end func

void func_0469() {

   int locals[22];

   say( "Surely. Be on thy way." );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0435();
   break;

   } // end switch

} // end func

void func_04b1() {

   int locals[22];

   say( "Listen, I don't want any trouble here, but thou had best mind thy manners." );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 17;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_050d();
   break;

   case 2:

      func_051a();
   break;

   case 3:

      func_056e();
   break;

   } // end switch

} // end func

void func_050d() {

   say( "No offense taken." );
   func_0147();
} // end func

void func_051a() {

   int locals[6];

   say( "So be it, fool!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_056e() {

   int locals[1];

   locals[1] = 20;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0586() {

   say( "You had better talk to the captain about that." );
   func_0165();
} // end func

void func_0593() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_064d() {

   int locals[6];

   locals[2] = get_quest( 1, &locals[3] );
   locals[3] = 134;
   if ( locals[2] == 0 ) {

      locals[2] = 1 + random( 1, &locals[4] ) + game_mins % 9;
      locals[4] = 900;
      locals[5] = 134;
      set_quest( 2, &locals[2], &locals[5] );
   } // end if

   locals[6] = locals[2];
   if ( 1 == locals[6] ) {

      locals[1] = 22;
   } else {

      if ( 2 == locals[6] ) {

         locals[1] = 23;
      } else {

         if ( 3 == locals[6] ) {

            locals[1] = 24;
         } else {

            if ( 4 == locals[6] ) {

               locals[1] = 25;
            } else {

               if ( 5 == locals[6] ) {

                  locals[1] = 26;
               } else {

                  if ( 6 == locals[6] ) {

                     locals[1] = 27;
                  } else {

                     if ( 7 == locals[6] ) {

                        locals[1] = 28;
                     } else {

                        if ( 8 == locals[6] ) {

                           locals[1] = 29;
                        } else {

                           if ( 9 == locals[6] ) {

                              locals[1] = 30;
                              goto label_0742;

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   label_0742:;

   return locals[1];
} // end func

void func_074a() {

   int locals[121];

   private[6] = 0;
   private[3] = sex( 2, &locals[2], &locals[1] );
   locals[1] = 31;
   locals[2] = 32;
   private[4] = sex( 2, &locals[4], &locals[3] );
   locals[3] = 33;
   locals[4] = 34;
   locals[5] = 0;
   if ( get_quest( 1, &locals[5] ) == 1 ) {

      func_035a();
   } // end if

   locals[6] = 35;
   print( 1, &locals[6] );
   locals[7] = 1;
   if ( get_quest( 1, &locals[7] ) == 0 ) {

      locals[8] = 3;
      if ( get_quest( 1, &locals[8] ) == 1 ) {

         func_03a5();
      } // end if

   } // end if

   if ( private[0] == 0 ) {

      private[2] = 0;
      private[5] = 1;
      if ( play_drawn == 1 ) {

         npc_attitude = 1;
         npc_goal = 8;
         say( "Halt, intruder! Thou comest here with weapon drawn -- seekest thou to die?!" );
         locals[9] = 37;
         locals[10] = 38;
         locals[11] = 0;
         locals[30] = babl_menu( 0, &locals[9] );
         switch ( locals[30] ) {

         case 1:

            func_1031();
         break;

         case 2:

         } // end if

      break;

      } // end switch

      say( "Halt, stranger! I hope thou knowest the password, for we know the rebels are all through these hills." );
      locals[31] = 40;
      locals[32] = 41;
      locals[33] = 0;
      locals[52] = babl_menu( 0, &locals[31] );
      switch ( locals[52] ) {

      case 1:

         func_1093();
      break;

      case 2:

         func_10ac();
      break;

      } // end switch

      locals[53] = 42;
      locals[54] = 43;
      locals[55] = 44;
      locals[56] = 0;
      locals[74] = babl_menu( 0, &locals[53] );
      switch ( locals[74] ) {

      case 1:

         func_09b7();
      break;

      case 2:

         func_0a24();
      break;

      case 3:

         func_1031();
      } // end if

   } else {

   break;

   } // end switch

   if ( private[2] == 1 ) {

      say( "Why dost thou linger here? Be on thy way." );
      locals[75] = 46;
      locals[76] = 47;
      locals[77] = 48;
      locals[78] = 0;
      locals[96] = babl_menu( 0, &locals[75] );
      switch ( locals[96] ) {

      case 1:

      break;

      case 2:

         func_0165();
      break;

      case 3:

         func_10c4();
      break;

      } // end switch

      say( "Very well." );
      locals[97] = 30;
      locals[98] = 34;
      locals[99] = 0;
      gronk_door( 3, &locals[99], &locals[98], &locals[97] );
   } else {

      say( "Why dost thou remain here, intruder?" );
      locals[100] = 51;
      locals[101] = 52;
      locals[102] = 53;
      locals[103] = 54;
      locals[104] = 0;
      locals[121] = babl_menu( 0, &locals[100] );
      switch ( locals[121] ) {

      case 1:

         func_0d74();
      break;

      case 2:

         func_09b7();
      break;

      case 3:

         func_0ab1();
      break;

      case 4:

         func_0a24();
      } // end if

   break;

   } // end switch

} // end func

void func_09b7() {

   int locals[24];

   say( "Tell us then, what is it?" );
   locals[2] = 56;
   locals[3] = 57;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

   break;

   case 2:

      func_10b7();
   break;

   } // end switch

   locals[1] = babl_ask( 0 );
   say( "\1@SS1\0" );
   locals[24] = func_064d();
   if ( contains( 2, &locals[1], &locals[24] ) ) {

      func_0cf1();
   } else {

      func_0a24();
   } // end if

} // end func

void func_0a24() {

   int locals[45];

   if ( locals[1] ) {

      say( "So thou hast entered the prison tower without knowing the password? Thou art a fool!" );
      locals[2] = 1;
      func_0593( &locals[2] );
   } else {

      say( "Well, then, why should I not kill thee for trespassing?" );
   } // end if

   locals[24] = 1;
   locals[3] = 61;
   locals[25] = private[5];
   locals[4] = 62;
   locals[26] = 1;
   locals[5] = 63;
   locals[6] = 0;
   locals[45] = babl_fmenu( 0, &locals[3], &locals[24] );
   switch ( locals[45] ) {

   case 61:

      func_0dc8();
   break;

   case 62:

      func_0ab1();
   break;

   case 63:

      func_0c52();
   break;

   } // end switch

} // end func

void func_0ab1() {

   int locals[1];

   say( "Where is thy delivery voucher?" );
   func_0abe();
} // end func

void func_0abe() {

   int locals[22];

   locals[1] = 65;
   locals[2] = 66;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b08();
   break;

   case 2:

   break;

   } // end switch

   private[5] = 0;
   func_0a24();
} // end func

void func_0b08() {

   int locals[46];

   locals[10] = 310;
   locals[11] = -1;
   find_barter_total( 4, &locals[2], &locals[3], &locals[11], &locals[10] );
   switch ( locals[2] ) {

   case 0:

      say( "Do not try any jokes with me, humie -- come back when thou hast found it." );
      locals[12] = 68;
      locals[13] = 69;
      locals[14] = 0;
      locals[33] = babl_menu( 0, &locals[12] );
      switch ( locals[33] ) {

      case 1:

         func_0156();
      break;

      case 2:

         func_0b08();
      break;

      } // end switch

   break;

   } // end switch

   switch ( locals[2] ) {

   case 1:

      locals[34] = 0;
      locals[35] = -1;
      locals[36] = -1;
      locals[37] = -1;
      locals[38] = -1;
      locals[39] = -1;
      locals[40] = -1;
      x_obj_stuff( 9, &locals[40], &locals[39], &locals[38], &locals[1], &locals[37], &locals[36], &locals[35], &locals[34], &locals[3] );
      if ( locals[1] == 33 + 512 ) {

         say( "'Tis a poor likeness, but I find no fault in it." );
         func_0cf1();
      } else {

         say( "This? This is no voucher!" );
         func_0a24();
      break;

   } // end if

   case 1:

      if ( private[6] == 3 ) {

         say( "This will put a stop to thy hijinks!" );
         locals[41] = 60;
         locals[42] = 1;
         set_quest( 2, &locals[42], &locals[41] );
         locals[43] = 15;
         locals[44] = 15;
         locals[45] = 10001;
         locals[46] = x_clock( 2, &locals[45], &locals[44] ) + 1;
         x_clock( 2, &locals[46], &locals[43] );
         func_0110();
      } // end if

      say( "Well? Which one is it?" );
      private[6] = private[6] + 1;
      func_0abe();
   break;

   } // end switch

} // end func

void func_0c52() {

   int locals[29];

   say( "Hee hee hee! No, thou shalt not pass." );
   locals[1] = 75;
   locals[2] = 76;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0ca2;

   break;

   } // end switch

   locals[23] = 10;
   func_0e1c( &locals[23] );
   func_0cf1();
   label_0ca2:;

   say( "We shall see who is in peril! Kill @GS34, comrades!" );
   locals[24] = 60;
   locals[25] = 1;
   set_quest( 2, &locals[25], &locals[24] );
   locals[26] = 15;
   locals[27] = 15;
   locals[28] = 10001;
   locals[29] = x_clock( 2, &locals[28], &locals[27] ) + 1;
   x_clock( 2, &locals[29], &locals[26] );
   func_0110();
} // end func

void func_0cf1() {

   int locals[28];

   locals[1] = 45;
   x_exp( 1, &locals[1] );
   say( "You may pass, then, stranger.\p" );
   locals[2] = 30;
   locals[3] = 34;
   locals[4] = 0;
   gronk_door( 3, &locals[4], &locals[3], &locals[2] );
   locals[5] = 40;
   locals[6] = 1;
   x_traps( 2, &locals[6], &locals[5] );
   private[2] = 1;
   npc_goal = 7;
   locals[7] = 79;
   locals[8] = 0;
   locals[28] = babl_menu( 0, &locals[7] );
   if ( locals[28] == 1 ) {

      func_0165();
   } // end if

} // end func

void func_0d74() {

   int locals[6];

   say( "Thou dost play with us?  Thou shalt die!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_0dc8() {

   int locals[6];

   say( "Avatar? Whate'er thou art, thou art an arrogant fool. Dispose of @GS34!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_0e1c() {

   int locals[100];

   locals[18] = 0;
   locals[16] = 0;
   locals[20] = 3 * param1[0]play_hunger - x_skills( 2, &locals[30], &locals[29] ) / 2;
   locals[29] = 15;
   locals[30] = 9999;
   label_0e51:;

   label_0e51:;

   locals[15] = show_inv( 2, &locals[8], &locals[1] );
   if ( locals[15] > 0 ) {

      locals[17] = 1;
      locals[19] = 0;
      while ( locals[17] <= locals[15] ) {

         if ( (locals[0] == 160 || locals[0] == 160) ) {

            locals[16] = locals[16] + identify_inv( 4, &locals[32], &locals[28], &locals[31], &locals[7] );
            locals[31] = 0;
            locals[32] = 0;
            locals[19] = locals[19] + 1;
            locals[20] = locals[7];
         } // end if

         locals[17] = locals[17] + 1;
      } // while

      if ( locals[16] >= locals[20] ) {

         give_to_npc( 2, &locals[21], &locals[19] );
         say( "All right, this is enough. It ain't right, but on a guard's pay I ain't got no choice. If anyone finds out about this, thou shalt die like a dog. Is that clear?" );
         locals[33] = 83;
         locals[34] = 84;
         locals[35] = 0;
         locals[54] = babl_menu( 0, &locals[33] );
         switch ( locals[54] ) {

         case 1:

            locals[55] = 1;
            set_attitude( 1, &locals[55] );
         break;

         case 2:

            locals[56] = 2;
            set_attitude( 1, &locals[56] );
         break;

         } // end switch

      } else {

         if ( locals[19] == 0 ) {

            say( "Look, I just need gold -- can't take these other goods!" );
         } else {

            say( "Thou must pay me more -- I shall be killed if this is discovered." );
         } // end if

         locals[57] = 87;
         locals[58] = 88;
         locals[59] = 89;
         locals[60] = 0;
         locals[78] = babl_menu( 0, &locals[57] );
         switch ( locals[78] ) {

         case 1:

            goto label_0e51;

         break;

         case 2:

            func_101b();
         break;

         case 3:

            func_0d74();
         } // end if

      } else {

      break;

      } // end switch

      if ( locals[18] > 2 ) {

         say( "I am tired of this foolishness." );
         func_0d74();
      } else {

         say( "Well? Show me what you have, quickly!" );
         locals[79] = 92;
         locals[80] = 93;
         locals[81] = 0;
         locals[100] = babl_menu( 0, &locals[79] );
         switch ( locals[100] ) {

         case 1:

            locals[18] = locals[18] + 1;
            goto label_0e51;

         break;

         case 2:

         } // end if

      break;

      } // end switch

      if ( param1[0]play_hunger == 10 ) {

         func_0a24();
      } else {

         say( "Good luck to thee, then!" );
         func_0165();
      } // end if

   } // end if

} // end func

void func_101b() {

   int locals[1];

   say( "Then thou shalt leave here or die." );
   locals[1] = 1;
   func_0136( &locals[1] );
} // end func

void func_1031() {

   int locals[7];

   locals[1] = 96;
   print( 1, &locals[1] );
   say( "Hey! This one's a rebel! Kill @GS34!" );
   locals[2] = 60;
   locals[3] = 1;
   set_quest( 2, &locals[3], &locals[2] );
   locals[4] = 15;
   locals[5] = 15;
   locals[6] = 10001;
   locals[7] = x_clock( 2, &locals[6], &locals[5] ) + 1;
   x_clock( 2, &locals[7], &locals[4] );
   func_0110();
} // end func

void func_1093() {

   int locals[1];

   locals[1] = 98;
   print( 1, &locals[1] );
   say( "Please remain calm, @GS35. I meant only to warn thee of the danger involved in coming here, and asked if thou didst know the password." );
} // end func

void func_10ac() {

   say( "What art thou playing at? No one comes to the prison tower by accident, stranger, so I bid thee, give us the password at once, or face the consequences." );
} // end func

void func_10b7() {

   say( "That is not it." );
   func_0a24();
} // end func

void func_10c4() {

   int locals[45];

   say( "There is no special key -- just follow standard security procedure!" );
   say( "O'course, if you've got the cash, I suppose I could...update thee on just what that procedure is." );
   locals[1] = 104;
   locals[2] = 105;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_110f;

   break;

   } // end switch

   say( "Good luck to thee, then!" );
   func_0165();
   label_110f:;

   say( "Let's see what y'got!" );
   locals[23] = 15;
   func_0e1c( &locals[23] );
   say( "I'm only explainin' this once -- the inner door ain't gonna open while you got the outer open. Only one door gets open at a time. Got it?" );
   locals[24] = 109;
   locals[25] = 110;
   locals[26] = 0;
   locals[45] = babl_menu( 0, &locals[24] );
   switch ( locals[45] ) {

   case 1:

      goto label_115e;

   break;

   case 2:

   break;

   } // end switch

   say( "Just remember, only one door opens at a time." );
   label_115e:;

   say( "Now, thou had best be on thy way!" );
   func_0156();
} // end func

conversation #3
string block 0x0e02, name Borne

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[22];

   say( "HEY! Canst not a guy take a shower hereabouts?" );
   locals[1] = 2;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

   } // end if

   npc_goal = 12;
   func_0156();
} // end func

conversation #4
string block 0x0e03, name Garg

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0690();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]global[0];
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[5];

   locals[1] = 1;
   print( 1, &locals[1] );
   say( "Help us! Oh, by the Titan, human, thou must help us! That thing is loose in the tower, it is killing us!" );
   locals[2] = 15;
   locals[3] = 15;
   locals[4] = 10001;
   locals[5] = x_clock( 2, &locals[4], &locals[3] ) + 1;
   x_clock( 2, &locals[5], &locals[2] );
   func_0156();
} // end func

void func_03a5() {

   int locals[22];

   say( "Yes?" );
   locals[1] = 4;
   locals[2] = 5;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_03ed();
   break;

   case 2:

      func_0469();
   break;

   } // end switch

} // end func

void func_03ed() {

   int locals[22];

   say( "What duty hast thou here? The tower is empty now!" );
   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0435();
   break;

   case 2:

      func_0110();
   break;

   } // end switch

} // end func

void func_0435() {

   int locals[22];

   say( "Go where thou wilt! Since Bishop took his own life, there is nothing to guard, and no reason to stop thee." );
   locals[1] = 10;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0147();
   } // end if

} // end func

void func_0469() {

   int locals[22];

   say( "Surely. Be on thy way." );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0435();
   break;

   } // end switch

} // end func

void func_04b1() {

   int locals[22];

   say( "Listen, I don't want any trouble here, but thou had best mind thy manners." );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 17;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_050d();
   break;

   case 2:

      func_051a();
   break;

   case 3:

      func_056e();
   break;

   } // end switch

} // end func

void func_050d() {

   say( "No offense taken." );
   func_0147();
} // end func

void func_051a() {

   int locals[6];

   say( "So be it, fool!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_056e() {

   int locals[1];

   locals[1] = 20;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0586() {

   say( "You had better talk to the captain about that." );
   func_0165();
} // end func

void func_0593() {

   int locals[6];

   locals[2] = get_quest( 1, &locals[3] );
   locals[3] = 134;
   if ( locals[2] == 0 ) {

      locals[2] = 1 + random( 1, &locals[4] ) + game_mins % 9;
      locals[4] = 900;
      locals[5] = 134;
      set_quest( 2, &locals[2], &locals[5] );
   } // end if

   locals[6] = locals[2];
   if ( 1 == locals[6] ) {

      locals[1] = 22;
   } else {

      if ( 2 == locals[6] ) {

         locals[1] = 23;
      } else {

         if ( 3 == locals[6] ) {

            locals[1] = 24;
         } else {

            if ( 4 == locals[6] ) {

               locals[1] = 25;
            } else {

               if ( 5 == locals[6] ) {

                  locals[1] = 26;
               } else {

                  if ( 6 == locals[6] ) {

                     locals[1] = 27;
                  } else {

                     if ( 7 == locals[6] ) {

                        locals[1] = 28;
                     } else {

                        if ( 8 == locals[6] ) {

                           locals[1] = 29;
                        } else {

                           if ( 9 == locals[6] ) {

                              locals[1] = 30;
                              goto label_0688;

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   label_0688:;

   return locals[1];
} // end func

void func_0690() {

   int locals[142];

   locals[3] = 0;
   if ( get_quest( 1, &locals[3] ) == 1 ) {

      func_035a();
   } // end if

   locals[2] = get_quest( 1, &locals[4] );
   locals[4] = 49;
   locals[5] = 3;
   if ( get_quest( 1, &locals[5] ) ) {

      if ( locals[1] == 0 ) {

         say( "Thy plan has been put into effect -- Bishop is dead. I arranged for my guards to discover him, and no one suspects a thing. As long as we stick together, no one shall know of our failure! Is it agreed?" );
      } else {

         say( "Thou hadst best be on thy way. I place my trust in thee." );
      } // end if

      locals[6] = 33;
      locals[7] = 34;
      locals[8] = 0;
      locals[27] = babl_menu( 0, &locals[6] );
      switch ( locals[27] ) {

      case 1:

         func_0e25();
      break;

      case 2:

         func_0e07();
      } // end if

   break;

   } // end switch

   locals[28] = 2;
   if ( get_quest( 1, &locals[28] ) == 1 ) {

      say( "I have already given the order -- he dies tonight. 'Til then, 'tis best we not be seen together." );
      locals[50] = 1;
      locals[29] = 36;
      locals[51] = 1;
      locals[30] = 37;
      locals[52] = global[3];
      locals[31] = 38;
      locals[53] = locals[2];
      locals[32] = 39;
      locals[33] = 0;
      locals[71] = babl_fmenu( 0, &locals[29], &locals[50] );
      switch ( locals[71] ) {

      case 36:

         func_0147();
      break;

      case 37:

         func_0e07();
      break;

      case 38:

         func_0ec7();
      break;

      case 39:

         func_0e32();
      } // end if

   break;

   } // end switch

   if ( private[0] == 0 ) {

      locals[72] = 15;
      locals[73] = 9999;
      if ( x_skills( 2, &locals[73], &locals[72] ) > 5 ) {

         global[0] = 0;
      } // end if

      locals[74] = 15;
      locals[75] = 9999;
      if ( x_skills( 2, &locals[75], &locals[74] ) >= 3 ) {

         global[0] = 1;
      } // end if

      locals[76] = 15;
      locals[77] = 9999;
      if ( x_skills( 2, &locals[77], &locals[76] ) < 3 ) {

         global[0] = 2;
      } // end if

      global[1] = 0;
      global[3] = 1;
      global[2] = 1;
      locals[1] = 0;
      say( "Lorca Batan! Thou'rt here already?" );
      locals[78] = 41;
      locals[79] = 42;
      locals[80] = 0;
      locals[99] = babl_menu( 0, &locals[78] );
      switch ( locals[99] ) {

      case 1:

         func_09b7();
      break;

      case 2:

         func_0910();
      } // end if

   } else {

   break;

   } // end switch

   say( "Back so soon! Hast thou had any success with Bishop?" );
   locals[121] = 1;
   locals[100] = 44;
   locals[122] = global[3];
   locals[101] = 45;
   locals[123] = 1;
   locals[102] = 46;
   locals[124] = locals[2];
   locals[103] = 47;
   locals[104] = 0;
   locals[142] = babl_fmenu( 0, &locals[100], &locals[121] );
   switch ( locals[142] ) {

   case 44:

      func_0d49();
   break;

   case 45:

      func_0ec7();
   break;

   case 46:

      func_0dfa();
   break;

   case 47:

      func_0e32();
   break;

   } // end switch

} // end func

void func_0910() {

   int locals[22];

   say( "'Tis a relief that thou hast come -- thy "friend" upstairs has given us no end of trouble." );
   locals[1] = 49;
   locals[2] = 50;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0958();
   break;

   case 2:

      func_0b0c();
   break;

   } // end switch

} // end func

void func_0958() {

   int locals[23];

   locals[1] = 51;
   print( 1, &locals[1] );
   global[0] = global[0] + 1;
   say( "I mean Bishop, of course! Did they not tell thee? " );
   locals[2] = 53;
   locals[3] = 54;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0a0b();
   break;

   case 2:

      func_0b0c();
   break;

   } // end switch

} // end func

void func_09b7() {

   int locals[6];

   say( "You goddamn humies all look alike! Guards, there's a rebel come in here after Bishop!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_0a0b() {

   int locals[22];

   global[0] = global[0] + 1;
   say( "Of course thou hast heard the "legend" among the humies (pardon the term!) -- the man raised from birth to oppose the Guardian, the invincible warrior, master strategist, rebel leader, all that drivel. A broken people, clinging to pipedreams!" );
   locals[1] = 57;
   locals[2] = 58;
   locals[3] = 59;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a70();
   break;

   case 2:

      func_0a70();
   break;

   case 3:

      func_0abb();
   break;

   } // end switch

} // end func

void func_0a70() {

   int locals[22];

   say( "Well, I tell thee this -- we tracked him through the mountains for four days, with no food and little rest, and still, at the last, 3 full squads fell to his magic and his blade before we brought him down! Never have I seen such fury, in man or goblin!" );
   locals[1] = 61;
   locals[2] = 62;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0c06();
   break;

   case 2:

   break;

   } // end switch

   say( "Indeed, thou art right. What was I thinking?" );
   func_0b0c();
} // end func

void func_0abb() {

   int locals[22];

   global[0] = global[0] + 1;
   say( "Dost thou play the fool, Lorca? I am speaking of those misfits who resist the Guardian's Peace!" );
   locals[1] = 65;
   locals[2] = 66;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b0c();
   break;

   case 2:

      func_0ce4();
   break;

   } // end switch

} // end func

void func_0b0c() {

   int locals[43];

   if ( global[2] ) {

      say( "Even in captivity, he has resisted our interrogator's finest efforts. If we had his knowledge of rebel tactics, we could end this war within a year, crush the last human...er, rebel resistance. As it is, he just sits there smugly, waiting for his friends to break in and rescue him." );
   } else {

      say( "I tell thee, he is like a rock -- we cannot move him!" );
   } // end if

   locals[22] = 1;
   locals[1] = 69;
   locals[23] = 1;
   locals[2] = 70;
   locals[24] = 1;
   locals[3] = 71;
   locals[25] = global[2];
   locals[4] = 72;
   locals[5] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 69:

      func_0c84();
   break;

   case 70:

      func_0ce4();
   break;

   case 71:

      func_0baa();
   break;

   case 72:

      func_0c06();
   break;

   } // end switch

} // end func

void func_0baa() {

   int locals[22];

   say( "'Tis a certainty! He knows it, and I know it too! We are too isolated here. They may be here any day." );
   locals[1] = 74;
   locals[2] = 75;
   locals[3] = 76;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0ce4();
   break;

   case 2:

      func_0c84();
   break;

   case 3:

      func_0b0c();
   break;

   } // end switch

} // end func

void func_0c06() {

   int locals[22];

   global[0] = global[0] + 1;
   if ( global[0] > 4 ) {

      func_0ce4();
   } // end if

   global[2] = 0;
   say( "I must know what he is thinking! I thought perhaps one of his own people might break him down." );
   if ( global[0] > 4 ) {

      func_0ce4();
   } // end if

   locals[1] = 78;
   locals[2] = 79;
   locals[3] = 80;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0c84();
   break;

   case 2:

      func_0b0c();
   break;

   case 3:

      func_0ce4();
   break;

   } // end switch

} // end func

void func_0c84() {

   int locals[25];

   if ( global[0] > 4 ) {

      func_0ce4();
   } // end if

   locals[1] = func_0593();
   locals[2] = 65;
   x_exp( 1, &locals[2] );
   say( "The results of thy visit are eagerly awaited in the capital. These gauntlets shall get thee through the forcefield, and the password is "@SS1"; the guard will let thee through." );
   locals[3] = 51;
   take_from_npc( 1, &locals[3] );
   locals[4] = 82;
   locals[5] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   if ( locals[25] == 1 ) {

      func_0165();
   } // end if

} // end func

void func_0ce4() {

   int locals[7];

   say( "Wait..." );
   locals[1] = 84;
   print( 1, &locals[1] );
   say( "Thou art not Lorca Batan at all, art thou? No, thou dost not talk or act or smell like him! Who art thou? An imposter from the Resistance! Guard!!" );
   locals[2] = 60;
   locals[3] = 1;
   set_quest( 2, &locals[3], &locals[2] );
   locals[4] = 15;
   locals[5] = 15;
   locals[6] = 10001;
   locals[7] = x_clock( 2, &locals[6], &locals[5] ) + 1;
   x_clock( 2, &locals[7], &locals[4] );
   func_0110();
} // end func

void func_0d49() {

   int locals[23];

   say( "What do you mean? If he is not made to talk, the Guardian's regent will have our heads! What will we do?" );
   locals[1] = 87;
   locals[2] = 88;
   locals[3] = 89;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0ded();
   break;

   case 2:

      func_0dbb();
   break;

   case 3:

   break;

   } // end switch

   say( "Indeed! And mongbats shall fly out of my butt! Thanks a lot, friend Batan." );
   locals[23] = 91;
   print( 1, &locals[23] );
   npc_goal = 2;
   func_0156();
} // end func

void func_0dbb() {

   int locals[3];

   say( "Lorca! Thou'rt a genius -- I knew I could count on thee. I shall have my men take care of it tonight." );
   global[1] = 1;
   locals[1] = 2;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 3;
   func_0136( &locals[3] );
} // end func

void func_0ded() {

   say( "You would fail in thy mission, and then leave me to be executed? No, I think not. I shall say rather that Bishop overpowered thee in his cell -- by the time, we got there, 'twas all over. I shall make this quick and painless, my friend." );
   func_0110();
} // end func

void func_0dfa() {

   say( "Well, why dost thou remain here? Make haste, man, for the regent himself awaits the outcome of thy efforts. This past week he hath spoken to me daily!" );
   func_0156();
} // end func

void func_0e07() {

   int locals[1];

   say( "We are in this too deep! Thou hast left me no choice." );
   locals[1] = 96;
   print( 1, &locals[1] );
   say( "Prepare thyself." );
   func_0110();
} // end func

void func_0e25() {

   say( "Our fates our joined, now, Lorca. Now return to the capital, and issue thy report to the Regent. I place my trust in thee." );
   func_0147();
} // end func

void func_0e32() {

   int locals[48];

   locals[2] = 49;
   locals[3] = 0;
   set_quest( 2, &locals[3], &locals[2] );
   say( "A mysterious letter arrived from the capitol, saying I should expect a gem to appear in, of all places, Bishop's cell. And there it was! I am a soldier, and a good one, and I like to stay clear of sorcerous doings! Know ye aught of the matter?" );
   locals[4] = 100;
   locals[5] = 101;
   locals[6] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "I am more than glad to give it up, Lorca. I wish only to be left out of the Guardian's magical conflicts! I thank thee, and good luck in thy work." );
   locals[26] = 280;
   take_from_npc( 1, &locals[26] );
   locals[27] = 103;
   locals[28] = 0;
   locals[48] = babl_menu( 0, &locals[27] );
   if ( locals[48] == 1 ) {

      func_0165();
   } // end if

} // end func

void func_0ec7() {

   int locals[24];

   global[3] = 0;
   locals[1] = 45;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   say( "They are not here -- Janar has them. But why dost thou want to open the other cells?" );
   locals[3] = 105;
   locals[4] = 106;
   locals[5] = 107;
   locals[6] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      goto label_0f3c;

   break;

   case 2:

      goto label_0f41;

   break;

   case 3:

      goto label_0f3c;

   break;

   } // end switch

   label_0f3c:;

   label_0f3c:;

   say( "I am sorry, but these prisoners are some of the most dangerous in the empire -- I cannot let thee in for such a reason." );
   func_0165();
   label_0f41:;

   say( "Thou'rt right, of course. Go ask Janar for them, and give him the codeword, "beacon."" );
   func_0165();
} // end func

conversation #5
string block 0x0e04, name goblin armorer

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[168];

   if ( private[0] == 0 ) {

      private[2] = 0;
      private[6] = 0;
      private[4] = 1;
      private[5] = 1;
      private[3] = 0;
   } // end if

   locals[1] = 0;
   if ( get_quest( 1, &locals[1] ) ) {

      locals[2] = 0;
      locals[3] = 0;
      set_quest( 2, &locals[3], &locals[2] );
      locals[4] = 67;
      locals[5] = 1;
      set_quest( 2, &locals[5], &locals[4] );
      func_0322();
      if ( private[0] == 0 ) {

         say( "Hey! You let me out! Who you?" );
         locals[6] = 2;
         locals[7] = 3;
         locals[8] = 0;
         locals[27] = babl_menu( 0, &locals[6] );
         switch ( locals[27] ) {

         case 1:

            func_0d80();
         break;

         case 2:

            func_0d80();
         } // end if

      break;

      } // end switch

      if ( private[5] ) {

         locals[28] = 27;
         if ( get_quest( 1, &locals[28] ) ) {

            locals[29] = 1;
            if ( get_quest( 1, &locals[29] ) ) {

               say( "Hey @GS8, letter come for you! From . . . from Bishop! That his name!" );
               private[5] = 0;
               func_0b7f();
            } // end if

         } // end if

      } // end if

      if ( private[4] ) {

         locals[30] = 44;
         if ( get_quest( 1, &locals[30] ) == 1 ) {

            locals[31] = 1;
            if ( get_quest( 1, &locals[31] ) ) {

               say( "Hey @GS8, I got letter for you! From... forget who it from! Some guy bring it, say leave it for you." );
               private[4] = 0;
               func_0a72();
            } // end if

         } // end if

      } // end if

      if ( private[6] ) {

         say( "Hey friend! You like new house?" );
         private[6] = 0;
         locals[32] = 7;
         locals[33] = 8;
         locals[34] = 0;
         locals[53] = babl_menu( 0, &locals[32] );
         switch ( locals[53] ) {

         case 1:

         break;

         case 2:

         break;

         } // end switch

         say( "When you go, me say, "Hallo gobbies! You in my house, and now is time for cleaning in spring!" Soon no gobbies no more. 'Cept for shiny bit at top, where me no can go." );
         locals[54] = 15;
         locals[55] = 15;
         locals[56] = 10001;
         locals[57] = x_clock( 2, &locals[56], &locals[55] ) + 1;
         x_clock( 2, &locals[57], &locals[54] );
         locals[58] = 10;
         locals[59] = 11;
         locals[60] = 12;
         locals[61] = 0;
         locals[79] = babl_menu( 0, &locals[58] );
         switch ( locals[79] ) {

         case 1:

            func_0a1e();
         break;

         case 2:

         break;

         case 3:

            func_0c8c();
         break;

         } // end switch

         say( "No worry -- if too many gobs, me just lock door." );
         locals[80] = 14;
         locals[81] = 15;
         locals[82] = 0;
         locals[101] = babl_menu( 0, &locals[80] );
         switch ( locals[101] ) {

         case 1:

            func_0a1e();
         break;

         case 2:

         break;

         } // end switch

         say( "Good idea. Me bored, think I left some gobbies there." );
         func_0a1e();
      } // end if

      if ( private[6] == 0 ) {

         say( "Hey @GS8, you back!" );
         locals[102] = 18;
         locals[103] = 19;
         locals[104] = 0;
         locals[123] = babl_menu( 0, &locals[102] );
         switch ( locals[123] ) {

         case 1:

            func_0c8c();
         break;

         case 2:

            func_0a1e();
         } // end if

      } // end if

   break;

   } // end switch

   if ( private[0] == 0 ) {

      locals[124] = 20;
      print( 1, &locals[124] );
      say( "Who you?" );
      locals[125] = 22;
      locals[126] = 23;
      locals[127] = 24;
      locals[128] = 0;
      locals[146] = babl_menu( 0, &locals[125] );
      switch ( locals[146] ) {

      case 1:

         func_0777();
      break;

      case 2:

         func_081b();
      break;

      case 3:

         func_0863();
      } // end if

   } else {

   break;

   } // end switch

   if ( private[2] ) {

      say( "Garg no talk to dead people!!" );
      func_0110();
   } // end if

   if ( private[3] ) {

      say( "What now?" );
      locals[147] = 27;
      locals[148] = 28;
      locals[149] = 0;
      locals[168] = babl_menu( 0, &locals[147] );
      switch ( locals[168] ) {

      case 1:

         func_07d3();
      break;

      case 2:

         func_0684();
      } // end if

   break;

   } // end switch

   say( "Hah! Me feel better now! Soon some gobs get hurt!" );
   func_0165();
} // end func

void func_0684() {

   int locals[22];

   say( "Me Garg. Gobbies wet pants when hear name Garg. You know why?" );
   locals[1] = 31;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_06b8();
   } // end if

} // end func

void func_06b8() {

   int locals[22];

   say( "Guardian, he come, bring his gobs. Guardian make plague, kill herds we live on, then gobs take our lands. Me Garg, me get mad, talk to other trolls, they do what me say. We find gobs, make them die, but always more come, too many for us even.\m When trolls dead, they bring me here." );
   private[3] = 0;
   locals[1] = 33;
   locals[2] = 34;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08c0();
   break;

   case 2:

      func_0705();
   break;

   } // end switch

} // end func

void func_0705() {

   int locals[44];

   say( "Make me talk 'bout plans, 'bout Bishop. Ha! Joke on them, try to get knowledge from Garg! Me even stupider than they are!" );
   locals[1] = 36;
   locals[2] = 37;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_08c0();
   break;

   } // end switch

   say( "When they come next, will kill them, kill all 'til they come with crossbows, then me die." );
   locals[23] = 39;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      func_07d3();
   } // end if

} // end func

void func_0777() {

   int locals[22];

   say( "Yeah? Who @GS8? Feeder? Killer? Who?" );
   locals[1] = 41;
   locals[2] = 42;
   locals[3] = 43;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_081b();
   break;

   case 2:

      func_08c0();
   break;

   case 3:

      func_07d3();
   break;

   } // end switch

} // end func

void func_07d3() {

   int locals[22];

   say( "Me have one wish? You leave now, leave door open 'hind you." );
   locals[1] = 45;
   locals[2] = 46;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08c0();
   break;

   case 2:

      func_0916();
   break;

   } // end switch

} // end func

void func_081b() {

   int locals[22];

   say( "Me not know you! How you friend?" );
   locals[1] = 48;
   locals[2] = 49;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08b3();
   break;

   case 2:

      func_08c0();
   break;

   } // end switch

} // end func

void func_0863() {

   int locals[22];

   say( "Huh! Adventure in jail! Some fun!" );
   locals[1] = 51;
   locals[2] = 52;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08c0();
   break;

   case 2:

   break;

   } // end switch

   private[3] = 1;
   say( "Ha! You leave door open too long! I leave now!" );
   func_0d96();
} // end func

void func_08b3() {

   say( "Garg have bet-ter idea -- you leave door o-pen -- I leave now! " );
   func_0d96();
} // end func

void func_08c0() {

   int locals[23];

   locals[1] = 55;
   print( 1, &locals[1] );
   say( "You get me out?" );
   locals[2] = 57;
   locals[3] = 58;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0923();
   break;

   case 2:

      func_0935();
   break;

   } // end switch

} // end func

void func_0916() {

   say( "No matter, you no stop me now!" );
   func_0d96();
} // end func

void func_0923() {

   say( "No matter, me cheer up soon, when door open and you dead!" );
   private[2] = 1;
   func_0110();
} // end func

void func_0935() {

   int locals[22];

   say( "Me thank thee. Time to smash some gobbies!" );
   locals[1] = 62;
   locals[2] = 63;
   locals[3] = 64;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0994();
   break;

   case 2:

      func_0d96();
   break;

   case 3:

   break;

   } // end switch

   say( "Pri-son-er? Gobs no make good pets -- Garg try this be-fore!" );
   func_0d96();
} // end func

void func_0994() {

   int locals[2];

   say( "'S'okay, friend. Hands fine for just gobs!" );
   private[6] = 1;
   locals[1] = 67;
   print( 1, &locals[1] );
   locals[2] = 3;
   func_0136( &locals[2] );
} // end func

void func_09bd() {

   int locals[6];

   locals[1] = find_barter( 1, &locals[2] );
   locals[2] = 1000;
   locals[3] = 1000;
   if ( find_barter( 1, &locals[3] ) ) {

      locals[4] = 1;
      give_ptr_npc( 2, &locals[4], &locals[1] );
      say( "Thanks!" );
      private[6] = 1;
      locals[5] = 69;
      print( 1, &locals[5] );
      locals[6] = 3;
      func_0136( &locals[6] );
   } else {

      func_0994();
   } // end if

} // end func

void func_0a1e() {

   int locals[23];

   say( "You come back, visit, ok?" );
   locals[1] = 71;
   locals[2] = 72;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_0147();
   break;

   } // end switch

   say( "Garg look forward . . . er, if he remember!" );
   locals[23] = 3;
   func_0136( &locals[23] );
} // end func

void func_0a72() {

   int locals[55];

   locals[1] = do_inv_create( 1, &locals[2] );
   locals[2] = 308;
   locals[3] = 1;
   locals[4] = 0;
   locals[5] = 0;
   locals[6] = 0;
   locals[7] = 34 + 512;
   locals[8] = 0;
   locals[9] = 0;
   locals[10] = 0;
   x_obj_stuff( 9, &locals[10], &locals[9], &locals[8], &locals[7], &locals[6], &locals[5], &locals[4], &locals[3], &locals[1] );
   say( "You take now, or maybe me lose later." );
   locals[11] = 75;
   locals[12] = 0;
   locals[32] = babl_menu( 0, &locals[11] );
   if ( locals[32] == 1 ) {

   } // end if

   locals[33] = 308;
   if ( take_from_npc( 1, &locals[33] ) == 1 ) {

      say( "Here you go." );
   } // end if

   if ( take_from_npc( 1, &locals[1] ) == 2 ) {

      say( "Garg just leave here for now." );
   } // end if

   if ( take_from_npc( 1, &locals[1] ) == 3 ) {

      say( "Oops, Garg encased in solid rock!" );
   } // end if

   locals[34] = 79;
   locals[35] = 80;
   locals[36] = 0;
   locals[55] = babl_menu( 0, &locals[34] );
   switch ( locals[55] ) {

   case 1:

      func_0c8c();
   break;

   case 2:

      func_0a1e();
   break;

   } // end switch

} // end func

void func_0b7f() {

   int locals[55];

   locals[1] = do_inv_create( 1, &locals[2] );
   locals[2] = 308;
   locals[3] = 1;
   locals[4] = 0;
   locals[5] = 0;
   locals[6] = 0;
   locals[7] = 49 + 512;
   locals[8] = 0;
   locals[9] = 0;
   locals[10] = 0;
   x_obj_stuff( 9, &locals[10], &locals[9], &locals[8], &locals[7], &locals[6], &locals[5], &locals[4], &locals[3], &locals[1] );
   say( "You take now, or maybe me lose later." );
   locals[11] = 82;
   locals[12] = 0;
   locals[32] = babl_menu( 0, &locals[11] );
   if ( locals[32] == 1 ) {

   } // end if

   locals[33] = 308;
   if ( take_from_npc( 1, &locals[33] ) == 1 ) {

      say( "Here you go." );
   } // end if

   if ( take_from_npc( 1, &locals[1] ) == 2 ) {

      say( "Garg just leave here for now." );
   } // end if

   if ( take_from_npc( 1, &locals[1] ) == 3 ) {

      say( "Oops, Garg encased in solid rock!" );
   } // end if

   locals[34] = 86;
   locals[35] = 87;
   locals[36] = 0;
   locals[55] = babl_menu( 0, &locals[34] );
   switch ( locals[55] ) {

   case 1:

      func_0c8c();
   break;

   case 2:

      func_0a1e();
   break;

   } // end switch

} // end func

void func_0c8c() {

   int locals[48];

   say( "Sure. Me teach you fight Garg way -- using weapons is cheating!" );
   locals[1] = 89;
   locals[2] = 90;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_0d65();
   break;

   } // end switch

   label_0ccf:;

   locals[23] = 2;
   locals[24] = 10001;
   if ( x_skills( 2, &locals[24], &locals[23] ) ) {

      locals[25] = 91;
      print( 1, &locals[25] );
      say( "This fun! You go some more?" );
      locals[26] = 93;
      locals[27] = 94;
      locals[28] = 0;
      locals[47] = babl_menu( 0, &locals[26] );
      switch ( locals[47] ) {

      case 1:

         goto label_0ccf;

      break;

      case 2:

         func_0a1e();
      } // end if

   } else {

   break;

   } // end switch

   locals[48] = 95;
   print( 1, &locals[48] );
   play_health = play_health - 10;
   if ( play_health <= 0 ) {

      play_health = 5;
   } // end if

   say( "Oh-oh! I think we stop now!" );
   func_0a1e();
} // end func

void func_0d65() {

   int locals[1];

   locals[1] = 97;
   print( 1, &locals[1] );
   say( "Me guess weapons okay for small people, like @GS8." );
   func_0a1e();
} // end func

void func_0d80() {

   int locals[1];

   say( "You Garg friend for sure now!" );
   locals[1] = 3;
   func_0136( &locals[1] );
} // end func

void func_0d96() {

   int locals[2];

   private[6] = 1;
   locals[1] = 100;
   print( 1, &locals[1] );
   locals[2] = 3;
   func_0136( &locals[2] );
} // end func

conversation #6
string block 0x0e05, name Bishop

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_080f();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[5];

   locals[1] = 1;
   print( 1, &locals[1] );
   say( "Help us! Oh, by the Titan, human, thou must help us! That thing is loose in the tower, it is killing us!" );
   locals[2] = 15;
   locals[3] = 15;
   locals[4] = 10001;
   locals[5] = x_clock( 2, &locals[4], &locals[3] ) + 1;
   x_clock( 2, &locals[5], &locals[2] );
   func_0156();
} // end func

void func_03a5() {

   int locals[22];

   say( "Yes?" );
   locals[1] = 4;
   locals[2] = 5;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_03ed();
   break;

   case 2:

      func_0469();
   break;

   } // end switch

} // end func

void func_03ed() {

   int locals[22];

   say( "What duty hast thou here? The tower is empty now!" );
   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0435();
   break;

   case 2:

      func_0110();
   break;

   } // end switch

} // end func

void func_0435() {

   int locals[22];

   say( "Go where thou wilt! Since Bishop took his own life, there is nothing to guard, and no reason to stop thee." );
   locals[1] = 10;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0147();
   } // end if

} // end func

void func_0469() {

   int locals[22];

   say( "Surely. Be on thy way." );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0435();
   break;

   } // end switch

} // end func

void func_04b1() {

   int locals[22];

   say( "Listen, I don't want any trouble here, but thou had best mind thy manners." );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 17;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_050d();
   break;

   case 2:

      func_051a();
   break;

   case 3:

      func_056e();
   break;

   } // end switch

} // end func

void func_050d() {

   say( "No offense taken." );
   func_0147();
} // end func

void func_051a() {

   int locals[6];

   say( "So be it, fool!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_056e() {

   int locals[1];

   locals[1] = 20;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0586() {

   say( "You had better talk to the captain about that." );
   func_0165();
} // end func

void func_0593() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 22;
      locals[2] = 23;
      locals[3] = 24;
      locals[4] = 25;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_0646();
      break;

      case 2:

         func_06a0();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 26;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_0646() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 27;
   locals[12] = 28;
   locals[13] = 29;
   locals[14] = 30;
   locals[15] = 31;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_06a0() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 33;
   locals[2] = 34;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 35;
   locals[24] = 36;
   locals[25] = 37;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_0712() {

   int locals[6];

   locals[2] = get_quest( 1, &locals[3] );
   locals[3] = 134;
   if ( locals[2] == 0 ) {

      locals[2] = 1 + random( 1, &locals[4] ) + game_mins % 9;
      locals[4] = 900;
      locals[5] = 134;
      set_quest( 2, &locals[2], &locals[5] );
   } // end if

   locals[6] = locals[2];
   if ( 1 == locals[6] ) {

      locals[1] = 38;
   } else {

      if ( 2 == locals[6] ) {

         locals[1] = 39;
      } else {

         if ( 3 == locals[6] ) {

            locals[1] = 40;
         } else {

            if ( 4 == locals[6] ) {

               locals[1] = 41;
            } else {

               if ( 5 == locals[6] ) {

                  locals[1] = 42;
               } else {

                  if ( 6 == locals[6] ) {

                     locals[1] = 43;
                  } else {

                     if ( 7 == locals[6] ) {

                        locals[1] = 44;
                     } else {

                        if ( 8 == locals[6] ) {

                           locals[1] = 45;
                        } else {

                           if ( 9 == locals[6] ) {

                              locals[1] = 46;
                              goto label_0807;

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   label_0807:;

   return locals[1];
} // end func

void func_080f() {

   int locals[71];

   locals[1] = 0;
   if ( get_quest( 1, &locals[1] ) == 1 ) {

      func_035a();
   } // end if

   if ( private[0] == 0 ) {

      locals[2] = 47;
      print( 1, &locals[2] );
      private[3] = 1;
      private[5] = 0;
      private[4] = 0;
      private[2] = sex( 2, &locals[4], &locals[3] );
      locals[3] = 48;
      locals[4] = 49;
      say( "Don't tell me, let me guess! I suppose this time you want them all made out of gold! Or ice! Or roast beef!" );
      locals[5] = 51;
      locals[6] = 52;
      locals[7] = 53;
      locals[8] = 0;
      locals[26] = babl_menu( 0, &locals[5] );
      switch ( locals[26] ) {

      case 1:

         func_09ef();
      break;

      case 2:

         func_0a92();
      break;

      case 3:

      break;

      } // end switch

      say( "Fine!" );
      func_0165();
   } // end if

   if ( private[0] ) {

      locals[27] = 3;
      if ( get_quest( 1, &locals[27] ) ) {

         say( "I guess the joke's on me, now. Captain just came in, says they don't need the damn gauntlets any more, anyway!" );
         func_0165();
      } // end if

      if ( private[4] ) {

         say( "I am pleased to see thee again! Thanks to thee, soon they shall have more gauntlets than they know what to do with!" );
         locals[28] = 57;
         locals[29] = 58;
         locals[30] = 59;
         locals[31] = 0;
         locals[49] = babl_menu( 0, &locals[28] );
         switch ( locals[49] ) {

         case 1:

            func_0165();
         break;

         case 2:

         break;

         case 3:

            func_0593();
         break;

         } // end switch

         if ( private[5] ) {

            say( "Nay, I can only spare thee the one pair." );
            func_0165();
         } else {

            func_0d7e();
         } // end if

      } else {

         say( "Eh? Why hast thou returned? Perhaps thou'rt here to taunt me in my frustration?" );
         locals[50] = 62;
         locals[51] = 63;
         locals[52] = 64;
         locals[53] = 0;
         locals[71] = babl_menu( 0, &locals[50] );
         switch ( locals[71] ) {

         case 1:

            func_099a();
         break;

         case 2:

            func_09a7();
         break;

         case 3:

            func_0d71();
         } // end if

      } // end if

   break;

   } // end switch

} // end func

void func_099a() {

   say( "Bah! I curse the day I was posted here!" );
   func_0165();
} // end func

void func_09a7() {

   int locals[22];

   say( "Really? Thou dost not jest? What canst thou do?" );
   locals[1] = 67;
   locals[2] = 68;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_09ef();
   break;

   case 2:

      func_099a();
   break;

   } // end switch

} // end func

void func_09ef() {

   int locals[22];

   say( "I'm talking about these infernal fraznium gauntlets! 'Tis like trying to forge links of wax, or resin! And no doubt THOU art come from the capital to demand gauntlets of buttered toast!" );
   locals[1] = 70;
   locals[2] = 71;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a37();
   break;

   case 2:

      func_0b63();
   break;

   } // end switch

} // end func

void func_0a37() {

   int locals[23];

   say( "I haven't the slightest idea! The security here is so tight, I don't even know where I am! All I know is, I'm a goblin in a room making gauntlets out of fraznium, because the Guardian wants it that way." );
   locals[1] = 73;
   locals[2] = 74;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b2d();
   break;

   case 2:

      func_0b63();
   break;

   } // end switch

   say( "Why, thank thee!" );
   locals[23] = 76;
   print( 1, &locals[23] );
   func_0147();
} // end func

void func_0a92() {

   int locals[44];

   say( "I am the prison armorer! Was this not obvious? And who art thou?" );
   locals[1] = 78;
   locals[2] = 79;
   locals[3] = 80;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b3a();
   break;

   case 2:

   break;

   case 3:

   break;

   } // end switch

   say( "Well, how extraordinary! And hast thou come to rescue me from my hideous tortures?" );
   locals[23] = 82;
   locals[24] = 83;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_09ef();
   break;

   case 2:

   break;

   } // end switch

   say( "No, I didn't really expect thee to." );
   func_0d59();
} // end func

void func_0b2d() {

   say( "Yes! It is!" );
   func_0156();
} // end func

void func_0b3a() {

   int locals[2];

   locals[1] = 86;
   print( 1, &locals[1] );
   say( "Hmm. No, I suppose it isn't." );
   locals[2] = 88;
   print( 1, &locals[2] );
   func_0165();
} // end func

void func_0b63() {

   int locals[22];

   say( "Well, then how?" );
   locals[1] = 90;
   locals[2] = 91;
   locals[3] = 92;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0d4c();
   break;

   case 2:

      func_0d2c();
   break;

   case 3:

      func_0bbf();
   break;

   } // end switch

} // end func

void func_0bbf() {

   int locals[44];

   locals[1] = !private[3];
   say( "Well, what wouldst thou like?" );
   locals[23] = private[3];
   locals[2] = 94;
   locals[24] = 1;
   locals[3] = 95;
   locals[25] = locals[1];
   locals[4] = 96;
   locals[5] = 0;
   locals[44] = babl_fmenu( 0, &locals[2], &locals[23] );
   switch ( locals[44] ) {

   case 94:

      func_0c81();
   break;

   case 95:

      func_0c3f();
   break;

   case 96:

      func_0c81();
   break;

   } // end switch

} // end func

void func_0c3f() {

   int locals[23];

   locals[1] = func_0712();
   say( "Well, I can't tell thee that, @GS33. Well, look, don't tell a soul I told thee. And tell me thy idea first." );
   private[4] = 1;
   locals[2] = 98;
   locals[3] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   if ( locals[23] == 1 ) {

   } // end if

   say( "Yes...yes, I suppose that could work! I won't ask how thou didst think of that. Oh, the password? It's "@SS1," but don't tell anyone I told thee! Now begone, thou dost make me nervous!" );
   func_0156();
} // end func

void func_0c81() {

   int locals[23];

   private[3] = 0;
   say( "I have here 10 gold pieces. Will that be enough?" );
   locals[1] = 101;
   locals[2] = 102;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0bbf();
   break;

   case 2:

   break;

   } // end switch

   say( "Here thou art. 'Tis all I have." );
   locals[23] = 160;
   take_from_npc( 1, &locals[23] );
   func_0cdf();
} // end func

void func_0cdf() {

   int locals[22];

   private[4] = 1;
   locals[1] = 104;
   locals[2] = 105;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0d2c();
   break;

   case 2:

   break;

   } // end switch

   say( "Try to trick me, wilt thou, human? This shall teach thee!" );
   func_0110();
} // end func

void func_0d2c() {

   int locals[1];

   locals[1] = 107;
   print( 1, &locals[1] );
   private[4] = 1;
   say( "Wh... it just might work, actually. Yes. Yes, I thank thee, and no doubt the Guardian does, too!" );
   func_0147();
} // end func

void func_0d4c() {

   say( "Obviously, thou and the Guardian have much in common!" );
   func_0165();
} // end func

void func_0d59() {

   int locals[1];

   locals[1] = 110;
   print( 1, &locals[1] );
   func_0165();
} // end func

void func_0d71() {

   say( "What? Now thou dost want a pair from me, when a single pair takes three weeks to make? Get thee gone, humie!" );
   func_0156();
} // end func

void func_0d7e() {

   int locals[23];

   say( "Certainly -- I know not why you might want a pair, but you are welcome to take this one." );
   locals[1] = 51;
   take_from_npc( 1, &locals[1] );
   private[5] = 1;
   locals[2] = 113;
   locals[3] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   if ( locals[23] == 1 ) {

      func_0165();
   } // end if

} // end func

conversation #7
string block 0x0e06, name Marcus

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[115];

   private[3] = find_inv( 2, &locals[2], &locals[1] );
   locals[1] = 280;
   locals[2] = 1;
   if ( private[0] == 0 ) {

      private[4] = 0;
      private[2] = 1;
      private[5] = 0;
      private[6] = 0;
      locals[3] = 1;
      print( 1, &locals[3] );
      locals[4] = 0;
      if ( get_quest( 1, &locals[4] ) ) {

         say( "Who art thou? A human? And what was that terrible din on the floor below?" );
         locals[5] = 3;
         locals[6] = 4;
         locals[7] = 0;
         locals[26] = babl_menu( 0, &locals[5] );
         switch ( locals[26] ) {

         case 1:

            func_0c17();
         break;

         case 2:

            func_0752();
         } // end if

      break;

      } // end switch

      say( "I presume thou art my newest interrogator? My old one was quite worn out." );
      locals[27] = 6;
      locals[28] = 7;
      locals[29] = 0;
      locals[48] = babl_menu( 0, &locals[27] );
      switch ( locals[48] ) {

      case 1:

         func_05ff();
      break;

      case 2:

         func_0752();
      } // end if

   } else {

   break;

   } // end switch

   if ( private[4] ) {

      if ( private[6] ) {

         say( "Well? Hast thou reconsidered?" );
         locals[49] = 9;
         locals[50] = 10;
         locals[51] = 0;
         locals[70] = babl_menu( 0, &locals[49] );
         switch ( locals[70] ) {

         case 1:

            func_0a46();
         break;

         case 2:

         break;

         } // end switch

         say( "Look thy fill." );
         locals[71] = 12;
         print( 1, &locals[71] );
         func_0165();
      } else {

         say( "Hast thou retrieved the gauntlets?" );
         locals[72] = 14;
         locals[73] = 15;
         locals[74] = 16;
         locals[75] = 0;
         locals[93] = babl_menu( 0, &locals[72] );
         switch ( locals[93] ) {

         case 1:

            func_0a46();
         break;

         case 2:

            func_05ed();
         break;

         case 3:

            func_05ed();
         } // end if

      } else {

      } // end if

   break;

   } // end switch

   say( "Have you retrieved the gauntlets yet?" );
   locals[94] = 18;
   locals[95] = 19;
   locals[96] = 20;
   locals[97] = 0;
   locals[115] = babl_menu( 0, &locals[94] );
   switch ( locals[115] ) {

   case 1:

      func_0a46();
   break;

   case 2:

      func_0541();
   break;

   case 3:

      func_0589();
   break;

   } // end switch

} // end func

void func_0541() {

   int locals[22];

   say( "You must accept the risk. Without me, the resistance can never succeed. Go, quickly!" );
   locals[1] = 22;
   locals[2] = 23;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0165();
   break;

   case 2:

      func_0589();
   break;

   } // end switch

} // end func

void func_0589() {

   int locals[22];

   say( "Listen -- if thou dost not fetch me those gauntlets, even as weak as I am, I will kill thee and take thine. My importance to history leaves me no other choice." );
   private[5] = 1;
   locals[1] = 25;
   locals[2] = 26;
   locals[3] = 27;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0156();
   break;

   case 2:

      func_0110();
   break;

   case 3:

   break;

   } // end switch

   say( "THE Avatar? Oh. Excuse me." );
   func_0752();
} // end func

void func_05ed() {

   say( "I am disappointed, Avatar. I will remain here until thou seest where thy duty lies. Do not be overlong." );
   private[6] = 1;
   func_0156();
} // end func

void func_05ff() {

   int locals[22];

   say( "Then who art thou? Some other mewling servant to the goblin race? My executioner, perhaps? Who art thou, thou craven dog?!" );
   locals[1] = 31;
   locals[2] = 32;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_064a();
   break;

   } // end switch

   say( "Thou art Britannia's Avatar?" );
   func_0752();
} // end func

void func_064a() {

   int locals[22];

   say( "My rescuer? Excellent! Why, this is unanticipated! Who sent thee? Art thou from the resistance?" );
   locals[1] = 35;
   locals[2] = 36;
   locals[3] = 37;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_06a9();
   break;

   case 2:

   break;

   case 3:

      func_0752();
   break;

   } // end switch

   say( "Never mind that." );
   func_06a9();
} // end func

void func_06a9() {

   int locals[22];

   private[7] = 1;
   say( "Give me a set of gauntlets, quickly, and I shall be off!" );
   locals[1] = 40;
   locals[2] = 41;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a46();
   break;

   case 2:

      func_06f6();
   break;

   } // end switch

} // end func

void func_06f6() {

   int locals[22];

   say( "Thou blundering nincompoop! Go back and get them!" );
   locals[1] = 43;
   locals[2] = 44;
   locals[3] = 45;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_0589();
   break;

   case 3:

      func_0589();
   break;

   } // end switch

   func_0156();
} // end func

void func_0752() {

   int locals[43];

   say( "'Tis an honor! I am Bishop, leader of the human resistance on this world. I regret I do not meet thee under more auspicious circumstances." );
   private[7] = 0;
   private[4] = 1;
   locals[22] = 1;
   locals[1] = 47;
   locals[23] = 1;
   locals[2] = 48;
   locals[24] = private[5];
   locals[3] = 49;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 47:

      func_0827();
   break;

   case 48:

      func_07dc();
   break;

   case 49:

   break;

   } // end switch

   say( "A foe such as the Guardian does not always allow one to adhere to the niceties of virtue. I shall be here if thou dost reconsider." );
   private[6] = 1;
   func_0165();
} // end func

void func_07dc() {

   int locals[22];

   say( "Poorly, since the dirty gobs struck their deal with the Guardian. He aids them, and in return they pledged to rule this world on his behalf. Though we beat them in the field, our crops die with no rain, plague rots our cattle from within." );
   locals[1] = 52;
   locals[2] = 53;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0954();
   break;

   case 2:

   break;

   } // end switch

   say( "I understand." );
   func_08b7();
} // end func

void func_0827() {

   int locals[22];

   say( "Thy name is known and honored among those who battle the Guardian on the many planes of reality." );
   locals[1] = 56;
   locals[2] = 57;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_090c();
   break;

   case 2:

      func_086f();
   break;

   } // end switch

} // end func

void func_086f() {

   int locals[22];

   say( "Who knows? 'Tis likely the planes are infinite, and so, it seems is the Guardian's greed for them. His power, though, is immense but finite -- lately it seems he has been withdrawing his power from this plane to invade another close by it." );
   locals[1] = 59;
   locals[2] = 60;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08b7();
   break;

   case 2:

      func_0954();
   break;

   } // end switch

} // end func

void func_08b7() {

   int locals[22];

   say( "My first loyalty must be to my own world, and I must press my own war here." );
   locals[1] = 62;
   locals[2] = 63;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08ff();
   break;

   case 2:

      func_090c();
   break;

   } // end switch

} // end func

void func_08ff() {

   say( "Avatar, it seems thy legends lie. I must take thy gauntlets by force. I grieve only that Britannia had no better protector in its time of need." );
   func_0110();
} // end func

void func_090c() {

   int locals[22];

   say( "Although I have no means of travelling the planes myself, I have been in contact with many like myself, who champion their own realities against the incursions of the Red Titan." );
   locals[1] = 66;
   locals[2] = 67;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0954();
   break;

   case 2:

      func_099c();
   break;

   } // end switch

} // end func

void func_0954() {

   int locals[22];

   say( "There is a certain symmetry among the many realities. Communication is easier among planes or places or even buildings that resemble one other, in their geographies or inhabitants or destinies." );
   locals[1] = 69;
   locals[2] = 70;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_099c();
   break;

   case 2:

      func_09c0();
   break;

   } // end switch

} // end func

void func_099c() {

   int locals[2];

   say( "For their sake, I fear to speak their names in this place. For the moment, I shall say only that thou shouldst look for a sorcerous lady in a fortress high above a desert. I cannot say more, for time is short, and I fear the Guardian has ears in this prison." );
   locals[1] = 58;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   func_09c0();
} // end func

void func_09c0() {

   int locals[44];

   say( "Indeed, I must be gone from here. Once free of this field, I shall be able to rejoin my troops by mystic means." );
   locals[1] = 73;
   locals[2] = 74;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_0be5();
   break;

   } // end switch

   say( "Thank thee, but art thou sure thou hast another pair? If not, thou wouldst be trapped forever." );
   locals[23] = 76;
   locals[24] = 77;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_0a46();
   break;

   case 2:

      func_0be5();
   break;

   } // end switch

} // end func

void func_0a46() {

   int locals[36];

   label_0a4b:;

   locals[1] = find_barter( 1, &locals[3] );
   locals[3] = 51;
   if ( locals[1] ) {

      locals[4] = 1;
      give_ptr_npc( 2, &locals[4], &locals[1] );
      if ( private[2] ) {

         private[2] = 0;
         private[7] = !private[4];
         if ( private[4] ) {

            if ( private[3] ) {

               locals[5] = 49;
               locals[6] = 1;
               set_quest( 2, &locals[6], &locals[5] );
               func_0b62();
            } else {

               locals[7] = 49;
               locals[8] = 1;
               set_quest( 2, &locals[8], &locals[7] );
               func_0bc5();
            } // end if

         } // end if

         if ( private[7] ) {

            locals[9] = 49;
            locals[10] = 1;
            set_quest( 2, &locals[10], &locals[9] );
            func_0bf7();
         } // end if

      } // end if

      say( "I shall not forget this." );
      locals[11] = 79;
      print( 1, &locals[11] );
      locals[12] = 1;
      locals[13] = 1;
      set_quest( 2, &locals[13], &locals[12] );
      locals[14] = 150;
      x_exp( 1, &locals[14] );
      remove_talker( 0 );
      func_0165();
   } else {

      say( "Where are they? Give them to me, quickly!" );
      locals[15] = 81;
      locals[16] = 82;
      locals[17] = 0;
      locals[36] = babl_menu( 0, &locals[15] );
      switch ( locals[36] ) {

      case 1:

         goto label_0a4b;

      break;

      case 2:

         func_0be5();
      } // end if

   break;

   } // end switch

} // end func

void func_0b62() {

   int locals[23];

   if ( game_days < 2 ) {

      locals[1] = 2;
   } else {

      locals[1] = game_days;
   } // end if

   say( "A word, Avatar! I see thou dost carry the black gem! Dost thou know its nature?" );
   locals[2] = 84;
   locals[3] = 85;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      goto label_0bbf;

   break;

   case 2:

   break;

   } // end switch

   say( "Nor I! It appeared in my cell, @SI1 days ago. 'Tis of great value, though, enough so that 6 armed guards risked entering my cell to take it from me. I sense the Guardian's sorcery in it, though I know not what part it plays in his designs." );
   return;

   label_0bbf:;

   say( "Then I need not stress its importance to thee, and to the fate of thy world!" );
} // end func

void func_0bc5() {

   int locals[1];

   if ( game_days < 2 ) {

      locals[1] = 2;
   } else {

      locals[1] = game_days;
   } // end if

   say( "A word, Avatar! @SI1 days ago, a strange black jewel, the size of my thumb, appeared here. Not long after, 6 guards (for so do they fear me) appeared and demanded it of me. I sensed the Guardian's sorcery in it, though I know not what part it plays in his designs. Thou shouldst seek it here, it may be of use to thee. Quickly now, we must hurry!" );
} // end func

void func_0be5() {

   say( "Do not be long!" );
   private[6] = 0;
   func_0156();
} // end func

void func_0bf7() {

   int locals[1];

   if ( game_days < 2 ) {

      locals[1] = 2;
   } else {

      locals[1] = game_days;
   } // end if

   say( "Just a moment! Weak as I am, I must fly from here at once. If thou dost have time, thou shouldst retrieve from the commander a small blackrock gem. It materialized in my cell not @SI1 days ago, and is likely of importance." );
} // end func

void func_0c17() {

   int locals[22];

   say( "Ah, thou hast encountered Garg! My sources informed me of his defeat, but I did not know he still lived. This shall upset the goblins no end. But who art thou?" );
   locals[1] = 92;
   locals[2] = 93;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0752();
   break;

   case 2:

   break;

   } // end switch

   say( "I recognize thee now -- thou art the Avatar!" );
   func_0752();
} // end func

conversation #8
string block 0x0e07, name Felix

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[2];

   if ( private[0] == 0 ) {

      locals[1] = 1;
      print( 1, &locals[1] );
   } // end if

   if ( private[0] ) {

      locals[2] = 2;
      print( 1, &locals[2] );
   } // end if

} // end func

conversation #9
string block 0x0e08, name goblin guard

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[85];

   private[4] = !get_quest( 1, &locals[2] );
   locals[2] = 10;
   locals[1] = sex( 2, &locals[4], &locals[3] );
   locals[3] = 1;
   locals[4] = 2;
   locals[5] = 0;
   if ( get_quest( 1, &locals[5] ) == 1 ) {

      if ( private[0] == 0 ) {

         say( "Hurry, stranger! Since the ogre slew the goblins, all we slaves are free! If thou dost know what is good for thee, thou wilt flee to the hills and meet up with the rebellion -- 'tis our chance to have revenge!" );
         locals[6] = 4;
         print( 1, &locals[6] );
      } else {

         locals[7] = 5;
         print( 1, &locals[7] );
         if ( private[2] ) {

            locals[8] = 10;
            if ( get_quest( 1, &locals[8] ) ) {

               say( "Thou hast done all thou didst promise, and more, @GS8! Thou hast earned this reward, and my gratitude." );
               locals[9] = 132;
               take_from_npc( 1, &locals[9] );
               say( "That troll hath freed us all! Marcus and I are off to the north, to see what remains of our kinfolk! Should we not meet again, I wish thee well!" );
            } else {

               say( "The ogre thou didst free has slain Freemis, and I have my vengeance and my freedom both! Here, thou dost deserve this, and my gratitude." );
               locals[10] = 132;
               take_from_npc( 1, &locals[10] );
               say( "And now Marcus and I are off to the north, to see what remains of our kinfolk! Should we not meet again, I wish thee well!" );
            } else {

               say( "Well, @SS1, I thank thee for freeing the ogre -- I am off to the north to see what remains of my kinfolk! Should we not meet again, I wish thee well!" );
            } // end if

         } // end if

      } // end if

      locals[11] = 57;
      locals[12] = 1;
      set_quest( 2, &locals[12], &locals[11] );
      locals[13] = 15;
      locals[14] = 15;
      locals[15] = 10001;
      locals[16] = x_clock( 2, &locals[15], &locals[14] ) + 1;
      x_clock( 2, &locals[16], &locals[13] );
      remove_talker( 0 );
      locals[17] = 3;
      func_0136( &locals[17] );
   } // end if

   if ( private[0] == 0 ) {

      private[3] = 0;
      locals[18] = 11;
      print( 1, &locals[18] );
      say( "Who art thou, and how comest another human here?" );
      locals[19] = 13;
      locals[20] = 14;
      locals[21] = 15;
      locals[22] = 16;
      locals[23] = 0;
      locals[40] = babl_menu( 0, &locals[19] );
      switch ( locals[40] ) {

      case 1:

         func_05b3();
      break;

      case 2:

         func_05fb();
      break;

      case 3:

         func_0cb6();
      break;

      case 4:

         func_0656();
      } // end if

   break;

   } // end switch

   if ( private[2] ) {

      say( "Hast thou succeeded in killing Freemis?" );
      locals[41] = 18;
      locals[42] = 19;
      locals[43] = 0;
      locals[62] = babl_menu( 0, &locals[41] );
      switch ( locals[62] ) {

      case 1:

         func_0c65();
      break;

      case 2:

         func_0ca9();
      } // end if

   break;

   } // end switch

   if ( private[3] ) {

      locals[63] = 20;
      print( 1, &locals[63] );
      func_0156();
   } // end if

   if ( private[0] ) {

      say( "So, thou hast returned. Did thy business go well?" );
      locals[64] = 22;
      locals[65] = 23;
      locals[66] = 24;
      locals[67] = 25;
      locals[68] = 0;
      locals[85] = babl_menu( 0, &locals[64] );
      switch ( locals[85] ) {

      case 1:

         func_0ae4();
      break;

      case 2:

         func_0ab8();
      break;

      case 3:

         func_0cb6();
      break;

      case 4:

         func_0ace();
      } // end if

   break;

   } // end switch

} // end func

void func_05b3() {

   int locals[22];

   say( "The goblins' business? How very nice for thee!" );
   locals[1] = 27;
   locals[2] = 28;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_06be();
   break;

   case 2:

      func_0656();
   break;

   } // end switch

} // end func

void func_05fb() {

   int locals[22];

   say( "I see. And what does virtue guide thee to do here?" );
   locals[1] = 30;
   locals[2] = 31;
   locals[3] = 32;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

   break;

   } // end switch

   say( "I see. Then know this, and then do what thou must." );
   func_08a4();
} // end func

void func_0656() {

   int locals[22];

   say( "Art thou not ashamed to serve willingly the sworn enemies of our race?" );
   locals[1] = 35;
   locals[2] = 36;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_06be();
   break;

   case 2:

      func_069e();
   break;

   } // end switch

} // end func

void func_069e() {

   int locals[1];

   private[3] = 1;
   locals[1] = 37;
   print( 1, &locals[1] );
   say( "We may both serve the goblins now, but it is you alone who are a traitor. Pray we do not meet sometime when thou art less well-armored." );
   func_0156();
} // end func

void func_06be() {

   int locals[65];

   say( "I apologize. 'Tis rare to see a brother human in these parts." );
   locals[1] = 40;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

   } // end if

   say( "'Tis thought a fine joke among their race, to be served by the former leaders of ours!" );
   locals[44] = 1;
   locals[23] = 42;
   locals[45] = 1;
   locals[24] = 43;
   locals[46] = 1;
   locals[25] = 44;
   locals[47] = private[4];
   locals[26] = 45;
   locals[27] = 0;
   locals[65] = babl_fmenu( 0, &locals[23], &locals[44] );
   switch ( locals[65] ) {

   case 42:

      func_08a4();
   break;

   case 43:

      func_077c();
   break;

   case 44:

      func_0978();
   break;

   case 45:

      func_0b40();
   break;

   } // end switch

} // end func

void func_077c() {

   int locals[43];

   say( "Aye, brother, someday the Resistance shall arrive!" );
   locals[22] = 1;
   locals[1] = 47;
   locals[23] = private[4];
   locals[2] = 48;
   locals[3] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 47:

      func_0829();
   break;

   case 48:

      func_0b40();
   break;

   } // end switch

} // end func

void func_07d8() {

   int locals[23];

   say( "But thou must be gone from here now! The guards return every twenty minutes! Perhaps I shall see thee again!" );
   locals[1] = 50;
   locals[2] = 51;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0165();
   break;

   case 2:

      locals[23] = 3;
      func_0136( &locals[23] );
   break;

   } // end switch

} // end func

void func_0829() {

   int locals[43];

   say( "But...would it not be better to wait for some more organized force? I mean, tactically speaking?" );
   locals[22] = private[4];
   locals[1] = 53;
   locals[23] = 1;
   locals[2] = 54;
   locals[24] = 1;
   locals[3] = 55;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 53:

      func_0b40();
   break;

   case 54:

      func_0aab();
   break;

   case 55:

   break;

   } // end switch

   say( "Enough! I am one man against a score or more of the gobs. I can do nothing! Now off with ye, and godspeed!" );
   func_0165();
} // end func

void func_08a4() {

   int locals[43];

   say( "My name is Felix. I was once Prince of Fyrna in the north, and my men and I were among the first to fall, plague-weakened, starved, to the goblin armies. It pleased them to make a slave of an aristocrat, but I know not how my men fared." );
   locals[22] = 1;
   locals[1] = 58;
   locals[23] = 1;
   locals[2] = 59;
   locals[24] = private[4];
   locals[3] = 60;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 58:

      func_0978();
   break;

   case 59:

      func_091c();
   break;

   case 60:

      func_0b40();
   break;

   } // end switch

} // end func

void func_091c() {

   int locals[43];

   say( "Aye, all that I know of, or penned and bred for food. All save Bishop's resistance, and even that may be a myth." );
   locals[22] = 1;
   locals[1] = 62;
   locals[23] = private[4];
   locals[2] = 63;
   locals[3] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 62:

      func_09f0();
   break;

   case 63:

      func_0b40();
   break;

   } // end switch

} // end func

void func_0978() {

   int locals[43];

   say( "Truthfully, I know not. Some sort of important prison. Some say it holds a captive demon, others say 'tis Bishop himself." );
   locals[22] = 1;
   locals[1] = 65;
   locals[23] = private[4];
   locals[2] = 66;
   locals[24] = 1;
   locals[3] = 67;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 65:

      func_09f0();
   break;

   case 66:

      func_0b40();
   break;

   case 67:

      func_0a9e();
   break;

   } // end switch

} // end func

void func_09f0() {

   int locals[86];

   say( "If one human can win this war, 'tis he! They say he fears nothing, and cannot be beaten in the field. It is said he is allied with darker powers even than the goblins are!" );
   locals[22] = private[4];
   locals[1] = 69;
   locals[23] = 1;
   locals[2] = 70;
   locals[3] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 69:

      func_0b40();
   break;

   case 70:

   break;

   } // end switch

   say( "The rotten gobs have a Titan backing them -- they say it's the Guardian, and they've promised him something in return for blighting our cattle and crops!" );
   locals[65] = 1;
   locals[44] = 72;
   locals[66] = private[4];
   locals[45] = 73;
   locals[46] = 0;
   locals[86] = babl_fmenu( 0, &locals[44], &locals[65] );
   switch ( locals[86] ) {

   case 72:

      func_0a9e();
   break;

   case 73:

      func_0b40();
   break;

   } // end switch

} // end func

void func_0a9e() {

   say( "You need only continue thy path upwards, to discover all. Above us lives Borne, the captain of the guards, and above him are the cells." );
   func_07d8();
} // end func

void func_0aab() {

   say( "Thou wouldst talk differently if thou hadst been at Fyrna that day!" );
   func_07d8();
} // end func

void func_0ab8() {

   int locals[1];

   say( "Good luck to thee, friend. Should you travel in the north, tell them there that I still live!" );
   locals[1] = 3;
   func_0136( &locals[1] );
} // end func

void func_0ace() {

   int locals[1];

   say( "You may count on me, my friend." );
   locals[1] = 3;
   func_0136( &locals[1] );
} // end func

void func_0ae4() {

   int locals[43];

   say( "Depressing, is it not?" );
   locals[22] = 1;
   locals[1] = 79;
   locals[23] = private[4];
   locals[2] = 80;
   locals[3] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 79:

   break;

   case 80:

      func_0b40();
   break;

   } // end switch

   func_0165();
} // end func

void func_0b40() {

   int locals[89];

   locals[1] = get_quest( 1, &locals[2] );
   locals[2] = 10;
   say( "Thou must kill Freemis!" );
   locals[24] = 1;
   locals[3] = 82;
   locals[25] = 1;
   locals[4] = 83;
   locals[26] = locals[1];
   locals[5] = 84;
   locals[6] = 0;
   locals[45] = babl_fmenu( 0, &locals[3], &locals[24] );
   switch ( locals[45] ) {

   case 82:

      func_0c46();
   break;

   case 83:

   break;

   case 84:

      func_0c65();
   break;

   } // end switch

   say( "He led the company of goblins that captured me and Marcus, my best knight. Later, he made me watch as they mutilated him. If you killed him, I would give thee my most prized possession." );
   locals[46] = 86;
   locals[47] = 87;
   locals[48] = 0;
   locals[67] = babl_menu( 0, &locals[46] );
   switch ( locals[67] ) {

   case 1:

   break;

   case 2:

      func_0c46();
   break;

   } // end switch

   say( "It is a cornucopia -- a basket of food which refills itself! I have used it sparingly, and it should last thee some time. I had it with me when the gobs caught me, and they never guessed its value! Now it is the last of my family's wealth." );
   locals[68] = 89;
   locals[69] = 90;
   locals[70] = 0;
   locals[89] = babl_menu( 0, &locals[68] );
   switch ( locals[89] ) {

   case 1:

      func_0c46();
   break;

   case 2:

      func_0c58();
   break;

   } // end switch

} // end func

void func_0c46() {

   private[2] = 1;
   say( "The bastard lives on the floor below us, in the barracks -- I see him every day! I would dearly love to see thee destroy him!" );
   func_0147();
} // end func

void func_0c58() {

   say( "Then I shall seek my own vengeance, whatever it may cost me." );
   func_0156();
} // end func

void func_0c65() {

   int locals[3];

   locals[1] = 10;
   if ( get_quest( 1, &locals[1] ) ) {

      say( "Then thou hast won vengeance for me, and for Marcus as well. Take thou this, then. It means little compared to what thou hast done for us." );
      locals[2] = 132;
      take_from_npc( 1, &locals[2] );
      private[2] = 0;
      locals[3] = 3;
      func_0136( &locals[3] );
   } // end if

   private[2] = 0;
   say( "Thou liest! He has just this minute left the room! I cannot believe thou wouldst deceive a fellow human for profit." );
   func_069e();
} // end func

void func_0ca9() {

   say( "I wish thee luck." );
   func_0147();
} // end func

void func_0cb6() {

   int locals[60];

   say( "You have slain the goblins -- then thou'rt with the resistance?" );
   locals[1] = 97;
   locals[2] = 98;
   locals[3] = 99;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0d55;

   break;

   case 3:

      goto label_0d5a;

   break;

   } // end switch

   say( "Thank the gods thou hast come! I had thought I would end my days cooking rat-meat for the gobs. But tell me -- are Marcus and I truly free to go?" );
   locals[23] = 101;
   locals[24] = 102;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

   break;

   case 2:

      goto label_0d50;

   break;

   } // end switch

   say( "It matters little now -- my fighting arm was once feared among the goblin ranks, and it shall be so again! Come, Marcus -- 'tis long past time we had quit this tower, and journeyed north again! Farewell and thanks, stranger!" );
   goto label_0d64;

   label_0d50:;

   say( "'Tis long past time we were gone from here! Come, Marcus, we shall journey north again, and see what remains of the family estate! Farewell, stranger, and my thanks! If thou'rt ever abroad in the northlands, look for me -- my name is Felix!" );
   goto label_0d64;

   label_0d55:;

   label_0d55:;

   say( "Thy duty? Well, I shall not question thee! Are Marcus and I truly free to go?" );
   goto label_0d55;

   label_0d5a:;

   say( "Flee, Marcus! 'Tis a madman!" );
   npc_goal = 6;
   func_0156();
   label_0d64:;

   label_0d64:;

   locals[45] = 60;
   locals[46] = 1;
   set_quest( 2, &locals[46], &locals[45] );
   locals[47] = 15;
   locals[48] = 15;
   locals[49] = 10001;
   locals[50] = x_clock( 2, &locals[49], &locals[48] ) + 1;
   x_clock( 2, &locals[50], &locals[47] );
   locals[51] = 107;
   print( 1, &locals[51] );
   locals[52] = 0;
   if ( get_quest( 1, &locals[52] ) == 0 ) {

      locals[53] = 108;
      print( 1, &locals[53] );
   } // end if

   locals[54] = 57;
   locals[55] = 1;
   set_quest( 2, &locals[55], &locals[54] );
   locals[56] = 15;
   locals[57] = 15;
   locals[58] = 10001;
   locals[59] = x_clock( 2, &locals[58], &locals[57] ) + 1;
   x_clock( 2, &locals[59], &locals[56] );
   remove_talker( 0 );
   locals[60] = 3;
   func_0136( &locals[60] );
} // end func

conversation #10
string block 0x0e09, name goblin guard

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0690();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[5];

   locals[1] = 1;
   print( 1, &locals[1] );
   say( "Help us! Oh, by the Titan, human, thou must help us! That thing is loose in the tower, it is killing us!" );
   locals[2] = 15;
   locals[3] = 15;
   locals[4] = 10001;
   locals[5] = x_clock( 2, &locals[4], &locals[3] ) + 1;
   x_clock( 2, &locals[5], &locals[2] );
   func_0156();
} // end func

void func_03a5() {

   int locals[22];

   say( "Yes?" );
   locals[1] = 4;
   locals[2] = 5;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_03ed();
   break;

   case 2:

      func_0469();
   break;

   } // end switch

} // end func

void func_03ed() {

   int locals[22];

   say( "What duty hast thou here? The tower is empty now!" );
   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0435();
   break;

   case 2:

      func_0110();
   break;

   } // end switch

} // end func

void func_0435() {

   int locals[22];

   say( "Go where thou wilt! Since Bishop took his own life, there is nothing to guard, and no reason to stop thee." );
   locals[1] = 10;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0147();
   } // end if

} // end func

void func_0469() {

   int locals[22];

   say( "Surely. Be on thy way." );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0435();
   break;

   } // end switch

} // end func

void func_04b1() {

   int locals[22];

   say( "Listen, I don't want any trouble here, but thou had best mind thy manners." );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 17;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_050d();
   break;

   case 2:

      func_051a();
   break;

   case 3:

      func_056e();
   break;

   } // end switch

} // end func

void func_050d() {

   say( "No offense taken." );
   func_0147();
} // end func

void func_051a() {

   int locals[6];

   say( "So be it, fool!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_056e() {

   int locals[1];

   locals[1] = 20;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0586() {

   say( "You had better talk to the captain about that." );
   func_0165();
} // end func

void func_0593() {

   int locals[6];

   locals[2] = get_quest( 1, &locals[3] );
   locals[3] = 134;
   if ( locals[2] == 0 ) {

      locals[2] = 1 + random( 1, &locals[4] ) + game_mins % 9;
      locals[4] = 900;
      locals[5] = 134;
      set_quest( 2, &locals[2], &locals[5] );
   } // end if

   locals[6] = locals[2];
   if ( 1 == locals[6] ) {

      locals[1] = 22;
   } else {

      if ( 2 == locals[6] ) {

         locals[1] = 23;
      } else {

         if ( 3 == locals[6] ) {

            locals[1] = 24;
         } else {

            if ( 4 == locals[6] ) {

               locals[1] = 25;
            } else {

               if ( 5 == locals[6] ) {

                  locals[1] = 26;
               } else {

                  if ( 6 == locals[6] ) {

                     locals[1] = 27;
                  } else {

                     if ( 7 == locals[6] ) {

                        locals[1] = 28;
                     } else {

                        if ( 8 == locals[6] ) {

                           locals[1] = 29;
                        } else {

                           if ( 9 == locals[6] ) {

                              locals[1] = 30;
                              goto label_0688;

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   label_0688:;

   return locals[1];
} // end func

void func_0690() {

   int locals[37];

   private[2] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 31;
   locals[3] = 32;
   locals[4] = 0;
   if ( get_quest( 1, &locals[4] ) == 1 ) {

      func_035a();
   } // end if

   locals[5] = 3;
   if ( get_quest( 1, &locals[5] ) == 1 ) {

      func_03a5();
   } // end if

   locals[6] = 33;
   print( 1, &locals[6] );
   say( "What dost thou want?" );
   locals[7] = 35;
   locals[8] = 36;
   locals[9] = 37;
   locals[10] = 38;
   locals[11] = 0;
   locals[28] = babl_menu( 0, &locals[7] );
   switch ( locals[28] ) {

   case 1:

      func_08f3();
   break;

   case 2:

      func_07f9();
   break;

   case 3:

   break;

   case 4:

      func_0900();
   break;

   } // end switch

   locals[1] = babl_ask( 0 );
   say( "\1@SS1\0" );
   locals[29] = func_0593();
   if ( contains( 2, &locals[1], &locals[29] ) ) {

      locals[30] = 29;
      locals[31] = 32;
      locals[32] = 0;
      gronk_door( 3, &locals[32], &locals[31], &locals[30] );
      say( "There you go, @GS33." );
      func_0165();
   } // end if

   locals[33] = 41;
   if ( contains( 2, &locals[1], &locals[33] ) ) {

      say( "What do I look like, a dwarf?" );
      func_0156();
   } // end if

   locals[34] = 43;
   if ( contains( 2, &locals[1], &locals[34] ) ) {

      locals[35] = 44;
      print( 1, &locals[35] );
      func_0156();
   } // end if

   locals[36] = 45;
   if ( contains( 1, &locals[36] ) ) {

      locals[37] = 46;
      print( 1, &locals[37] );
      func_0156();
   } // end if

   func_08d8();
} // end func

void func_07f9() {

   int locals[30];

   say( "What's the password?" );
   locals[2] = 48;
   locals[3] = 49;
   locals[4] = 50;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0900();
   break;

   case 2:

   break;

   case 3:

      func_08f3();
   break;

   } // end switch

   locals[1] = babl_ask( 0 );
   say( "\1@SS1\0" );
   locals[24] = func_0593();
   if ( contains( 2, &locals[1], &locals[24] ) ) {

      locals[25] = 29;
      locals[26] = 32;
      locals[27] = 0;
      gronk_door( 3, &locals[27], &locals[26], &locals[25] );
      say( "There you go, @GS33." );
      func_0165();
   } // end if

   locals[28] = 53;
   if ( contains( 2, &locals[1], &locals[28] ) ) {

      say( "What do I look like, a dwarf?" );
      func_0156();
   } // end if

   locals[29] = 55;
   if ( contains( 2, &locals[1], &locals[29] ) ) {

      locals[30] = 56;
      print( 1, &locals[30] );
      func_0156();
   } // end if

   func_08d8();
} // end func

void func_08d8() {

   int locals[1];

   locals[1] = 57;
   print( 1, &locals[1] );
   say( "That is not the password, human. If thou art lost or confused, thou shouldst speak to Borne, the captain of the guards." );
   func_0156();
} // end func

void func_08f3() {

   say( "Those who fight for the Guardian do not fear death." );
   func_0110();
} // end func

void func_0900() {

   say( "You'd better check in with Borne, the captain, then, @GS33." );
   func_0165();
} // end func

conversation #11
string block 0x0e0a, name Freemis

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0712();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[5];

   locals[1] = 1;
   print( 1, &locals[1] );
   say( "Help us! Oh, by the Titan, human, thou must help us! That thing is loose in the tower, it is killing us!" );
   locals[2] = 15;
   locals[3] = 15;
   locals[4] = 10001;
   locals[5] = x_clock( 2, &locals[4], &locals[3] ) + 1;
   x_clock( 2, &locals[5], &locals[2] );
   func_0156();
} // end func

void func_03a5() {

   int locals[22];

   say( "Yes?" );
   locals[1] = 4;
   locals[2] = 5;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_03ed();
   break;

   case 2:

      func_0469();
   break;

   } // end switch

} // end func

void func_03ed() {

   int locals[22];

   say( "What duty hast thou here? The tower is empty now!" );
   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0435();
   break;

   case 2:

      func_0110();
   break;

   } // end switch

} // end func

void func_0435() {

   int locals[22];

   say( "Go where thou wilt! Since Bishop took his own life, there is nothing to guard, and no reason to stop thee." );
   locals[1] = 10;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0147();
   } // end if

} // end func

void func_0469() {

   int locals[22];

   say( "Surely. Be on thy way." );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0435();
   break;

   } // end switch

} // end func

void func_04b1() {

   int locals[22];

   say( "Listen, I don't want any trouble here, but thou had best mind thy manners." );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 17;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_050d();
   break;

   case 2:

      func_051a();
   break;

   case 3:

      func_056e();
   break;

   } // end switch

} // end func

void func_050d() {

   say( "No offense taken." );
   func_0147();
} // end func

void func_051a() {

   int locals[6];

   say( "So be it, fool!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_056e() {

   int locals[1];

   locals[1] = 20;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0586() {

   say( "You had better talk to the captain about that." );
   func_0165();
} // end func

void func_0593() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 22;
      locals[2] = 23;
      locals[3] = 24;
      locals[4] = 25;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_0646();
      break;

      case 2:

         func_06a0();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 26;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_0646() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 27;
   locals[12] = 28;
   locals[13] = 29;
   locals[14] = 30;
   locals[15] = 31;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_06a0() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 33;
   locals[2] = 34;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 35;
   locals[24] = 36;
   locals[25] = 37;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_0712() {

   int locals[26];

   locals[1] = 0;
   if ( get_quest( 1, &locals[1] ) == 1 ) {

      func_035a();
   } // end if

   locals[2] = 3;
   if ( get_quest( 1, &locals[2] ) == 1 ) {

      func_03a5();
   } // end if

   private[2] = sex( 2, &locals[4], &locals[3] );
   locals[3] = 38;
   locals[4] = 39;
   say( "Please try not to touch anything, @GS33. The armory is a restricted area." );
   locals[5] = 41;
   locals[6] = 42;
   locals[7] = 43;
   locals[8] = 44;
   locals[9] = 0;
   locals[26] = babl_menu( 0, &locals[5] );
   switch ( locals[26] ) {

   case 1:

      func_04b1();
   break;

   case 2:

      func_0586();
   break;

   case 3:

      goto label_07c6;

   break;

   case 4:

      func_0165();
   break;

   } // end switch

   label_07c6:;

   say( "I suppose I might. What dost thou propose?" );
   func_0593();
} // end func

conversation #12
string block 0x0e0b, name goblin guard

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0593();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[5];

   locals[1] = 1;
   print( 1, &locals[1] );
   say( "Help us! Oh, by the Titan, human, thou must help us! That thing is loose in the tower, it is killing us!" );
   locals[2] = 15;
   locals[3] = 15;
   locals[4] = 10001;
   locals[5] = x_clock( 2, &locals[4], &locals[3] ) + 1;
   x_clock( 2, &locals[5], &locals[2] );
   func_0156();
} // end func

void func_03a5() {

   int locals[22];

   say( "Yes?" );
   locals[1] = 4;
   locals[2] = 5;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_03ed();
   break;

   case 2:

      func_0469();
   break;

   } // end switch

} // end func

void func_03ed() {

   int locals[22];

   say( "What duty hast thou here? The tower is empty now!" );
   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0435();
   break;

   case 2:

      func_0110();
   break;

   } // end switch

} // end func

void func_0435() {

   int locals[22];

   say( "Go where thou wilt! Since Bishop took his own life, there is nothing to guard, and no reason to stop thee." );
   locals[1] = 10;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0147();
   } // end if

} // end func

void func_0469() {

   int locals[22];

   say( "Surely. Be on thy way." );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0435();
   break;

   } // end switch

} // end func

void func_04b1() {

   int locals[22];

   say( "Listen, I don't want any trouble here, but thou had best mind thy manners." );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 17;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_050d();
   break;

   case 2:

      func_051a();
   break;

   case 3:

      func_056e();
   break;

   } // end switch

} // end func

void func_050d() {

   say( "No offense taken." );
   func_0147();
} // end func

void func_051a() {

   int locals[6];

   say( "So be it, fool!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_056e() {

   int locals[1];

   locals[1] = 20;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0586() {

   say( "You had better talk to the captain about that." );
   func_0165();
} // end func

void func_0593() {

   int locals[113];

   locals[1] = 0;
   if ( get_quest( 1, &locals[1] ) == 1 ) {

      func_035a();
   } // end if

   private[4] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 22;
   locals[3] = 23;
   if ( play_drawn ) {

      say( "Art thou drawn? Seekest thou a fight here, humie?" );
      locals[4] = 25;
      locals[5] = 26;
      locals[6] = 0;
      locals[25] = babl_menu( 0, &locals[4] );
      switch ( locals[25] ) {

      case 1:

      break;

      case 2:

         func_0853();
      } // end if

   break;

   } // end switch

   if ( private[0] == 0 ) {

      private[2] = 0;
      private[3] = 1;
      say( "What wouldst thou with me, humie?" );
      locals[26] = 28;
      locals[27] = 29;
      locals[28] = 30;
      locals[29] = 31;
      locals[30] = 0;
      locals[47] = babl_menu( 0, &locals[26] );
      switch ( locals[47] ) {

      case 1:

         func_074d();
      break;

      case 2:

         func_07a9();
      break;

      case 3:

         func_074d();
      break;

      case 4:

         func_08ce();
      } // end if

   } else {

   break;

   } // end switch

   if ( private[2] ) {

      locals[48] = 32;
      print( 1, &locals[48] );
      locals[49] = 33;
      locals[50] = 34;
      locals[51] = 0;
      locals[70] = babl_menu( 0, &locals[49] );
      switch ( locals[70] ) {

      case 1:

         func_099d();
      break;

      case 2:

         func_0156();
      } // end if

   } else {

   break;

   } // end switch

   say( "Why, 'tis the ape-@GS35, come back again!" );
   locals[92] = 1;
   locals[71] = 36;
   locals[93] = 1;
   locals[72] = 37;
   locals[94] = private[3];
   locals[73] = 38;
   locals[74] = 0;
   locals[113] = babl_fmenu( 0, &locals[71], &locals[92] );
   switch ( locals[113] ) {

   case 36:

      func_0853();
   break;

   case 37:

      func_0846();
   break;

   case 38:

      func_08ce();
   break;

   } // end switch

} // end func

void func_074d() {

   int locals[22];

   say( "What's that thou sayest? Where do the servants live? Oh, thy rooms are on the next floor, humie. My regards to Felix!" );
   locals[1] = 40;
   locals[2] = 41;
   locals[3] = 42;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0839();
   break;

   case 2:

      func_0846();
   break;

   case 3:

      func_07f1();
   break;

   } // end switch

} // end func

void func_07a9() {

   int locals[22];

   say( "@GS8! A fine name for a pet!" );
   locals[1] = 44;
   locals[2] = 45;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0853();
   break;

   case 2:

      func_0846();
   break;

   } // end switch

} // end func

void func_07f1() {

   int locals[22];

   say( "Oh, it bites! Oh, it hurts us, it does!" );
   locals[1] = 47;
   locals[2] = 48;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0853();
   break;

   case 2:

      func_0846();
   break;

   } // end switch

} // end func

void func_0839() {

   say( "Aye, will you, filth?" );
   func_0110();
} // end func

void func_0846() {

   say( "Aye, now begone!" );
   func_0165();
} // end func

void func_0853() {

   int locals[23];

   say( "Nay, human, 'twas but in fun! Art thou crazy?" );
   private[2] = 1;
   locals[1] = 52;
   locals[2] = 53;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_08b3();
   break;

   } // end switch

   npc_goal = 6;
   locals[23] = 54;
   print( 1, &locals[23] );
   func_0156();
} // end func

void func_08b3() {

   int locals[1];

   locals[1] = 55;
   print( 1, &locals[1] );
   say( "These humans are crazy!" );
   func_0156();
} // end func

void func_08ce() {

   int locals[23];

   locals[1] = 57;
   print( 1, &locals[1] );
   say( "Is it not clear, humie? Thy race was made to serve mine! 'Tis the will of the Guardian, else why would he send us plenty, and blight thy lands with plague and famine?" );
   private[3] = 0;
   locals[2] = 59;
   locals[3] = 60;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0929();
   break;

   case 2:

      func_0846();
   break;

   } // end switch

} // end func

void func_0929() {

   int locals[22];

   say( "Then thou art the slave of a slave, lackwit, and I suggest that thou watch thy loose tongue, in the future." );
   locals[1] = 62;
   locals[2] = 63;
   locals[3] = 64;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0985();
   break;

   case 2:

      func_0846();
   break;

   case 3:

      func_0853();
   break;

   } // end switch

} // end func

void func_0985() {

   int locals[1];

   locals[1] = 65;
   print( 1, &locals[1] );
   func_0165();
} // end func

void func_099d() {

   int locals[44];

   say( "On the seventh floor. And, I think, one on the fifth. May I go now?" );
   locals[1] = 67;
   locals[2] = 68;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08b3();
   break;

   case 2:

   break;

   } // end switch

   say( "On the fifth floor. Now may I go?" );
   locals[23] = 70;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      func_08b3();
   } // end if

} // end func

could not load code ...
conversation #14
string block 0x0e0d, name goblin guard

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_03b7();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]global[0];
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   say( "Is that hair, or has grass taken root on thy head?" );
} // end func

void func_0365() {

   say( "Hey Freemis, who let the ape in?" );
} // end func

void func_0370() {

   int locals[3];

   locals[1] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 3;
   locals[3] = 4;
   say( "Hurry up with my food, monkey-@SS1!" );
} // end func

void func_0396() {

   say( "Hey, humie, tell your friends in the kitchen to hurry up!" );
} // end func

void func_03a1() {

   say( "And tell Marcus not to be so free with his tongue!" );
} // end func

void func_03ac() {

   say( "Beware, human, lest we think up any new and funnier insults!" );
} // end func

void func_03b7() {

   int locals[2];

   if ( private[0] == 0 ) {

      global[0] = 1;
   } // end if

   locals[1] = global[0];
   if ( 1 == locals[1] ) {

      func_0365();
   } else {

      if ( 2 == locals[1] ) {

         func_035a();
      } else {

         if ( 3 == locals[1] ) {

            func_0370();
         } else {

            if ( 4 == locals[1] ) {

               func_0396();
            } else {

               if ( 5 == locals[1] ) {

                  func_03a1();
               } else {

                  if ( 6 == locals[1] ) {

                     func_03ac();
                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   locals[2] = 9;
   print( 1, &locals[2] );
   global[0] = global[0] + 1;
   if ( global[0] == 7 ) {

      global[0] = 1;
   } // end if

   npc_goal = 8;
} // end func

conversation #15
string block 0x0e0e, name goblin guard

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[43];

   if ( private[5] == 0 ) {

      private[3] = 1;
      private[4] = 1;
      private[2] = 1;
      private[5] = 1;
      say( "Do not mind them." );
   } // end if

   say( "Come, what art thou looking for?" );
   locals[22] = private[4];
   locals[1] = 3;
   locals[23] = private[3];
   locals[2] = 4;
   locals[24] = private[2];
   locals[3] = 5;
   locals[25] = 1;
   locals[4] = 6;
   locals[5] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 3:

      func_040f();
   break;

   case 4:

      func_045f();
   break;

   case 5:

      func_04ac();
   break;

   case 6:

      func_0165();
   break;

   } // end switch

} // end func

void func_040f() {

   int locals[22];

   say( "Do not give way to anger here, human -- they will kill thee!" );
   private[4] = 0;
   locals[1] = 8;
   locals[2] = 9;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_0165();
   break;

   } // end switch

   say( "I warn thee, keep thy temper!" );
   func_0156();
} // end func

void func_045f() {

   int locals[22];

   say( "'Tis back the way you came. Thou hadst better hurry -- ever since Freemis's lover was killed outside Fyrna, he has had no self-control!" );
   private[3] = 0;
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0156();
   break;

   } // end switch

} // end func

void func_04ac() {

   int locals[22];

   private[2] = 0;
   say( "I do not understand thee, fellow. Seek the Guardian? What dost thou mean?" );
   locals[1] = 15;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_035a();
   } // end if

} // end func

conversation #16
string block 0x0e0f, name Milenus

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0690();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[5];

   locals[1] = 1;
   print( 1, &locals[1] );
   say( "Help us! Oh, by the Titan, human, thou must help us! That thing is loose in the tower, it is killing us!" );
   locals[2] = 15;
   locals[3] = 15;
   locals[4] = 10001;
   locals[5] = x_clock( 2, &locals[4], &locals[3] ) + 1;
   x_clock( 2, &locals[5], &locals[2] );
   func_0156();
} // end func

void func_03a5() {

   int locals[22];

   say( "Yes?" );
   locals[1] = 4;
   locals[2] = 5;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_03ed();
   break;

   case 2:

      func_0469();
   break;

   } // end switch

} // end func

void func_03ed() {

   int locals[22];

   say( "What duty hast thou here? The tower is empty now!" );
   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0435();
   break;

   case 2:

      func_0110();
   break;

   } // end switch

} // end func

void func_0435() {

   int locals[22];

   say( "Go where thou wilt! Since Bishop took his own life, there is nothing to guard, and no reason to stop thee." );
   locals[1] = 10;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0147();
   } // end if

} // end func

void func_0469() {

   int locals[22];

   say( "Surely. Be on thy way." );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0435();
   break;

   } // end switch

} // end func

void func_04b1() {

   int locals[22];

   say( "Listen, I don't want any trouble here, but thou had best mind thy manners." );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 17;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_050d();
   break;

   case 2:

      func_051a();
   break;

   case 3:

      func_056e();
   break;

   } // end switch

} // end func

void func_050d() {

   say( "No offense taken." );
   func_0147();
} // end func

void func_051a() {

   int locals[6];

   say( "So be it, fool!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_056e() {

   int locals[1];

   locals[1] = 20;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0586() {

   say( "You had better talk to the captain about that." );
   func_0165();
} // end func

void func_0593() {

   int locals[6];

   locals[2] = get_quest( 1, &locals[3] );
   locals[3] = 134;
   if ( locals[2] == 0 ) {

      locals[2] = 1 + random( 1, &locals[4] ) + game_mins % 9;
      locals[4] = 900;
      locals[5] = 134;
      set_quest( 2, &locals[2], &locals[5] );
   } // end if

   locals[6] = locals[2];
   if ( 1 == locals[6] ) {

      locals[1] = 22;
   } else {

      if ( 2 == locals[6] ) {

         locals[1] = 23;
      } else {

         if ( 3 == locals[6] ) {

            locals[1] = 24;
         } else {

            if ( 4 == locals[6] ) {

               locals[1] = 25;
            } else {

               if ( 5 == locals[6] ) {

                  locals[1] = 26;
               } else {

                  if ( 6 == locals[6] ) {

                     locals[1] = 27;
                  } else {

                     if ( 7 == locals[6] ) {

                        locals[1] = 28;
                     } else {

                        if ( 8 == locals[6] ) {

                           locals[1] = 29;
                        } else {

                           if ( 9 == locals[6] ) {

                              locals[1] = 30;
                              goto label_0688;

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   label_0688:;

   return locals[1];
} // end func

void func_0690() {

   int locals[52];

   private[2] = x_traps( 2, &locals[3], &locals[2] );
   locals[2] = 43;
   locals[3] = 10001;
   locals[1] = sex( 2, &locals[5], &locals[4] );
   locals[4] = 31;
   locals[5] = 32;
   npc_goal = 8;
   locals[6] = 3;
   if ( get_quest( 1, &locals[6] ) == 1 ) {

      func_03a5();
   } // end if

   private[4] = sex( 2, &locals[8], &locals[7] );
   locals[7] = 33;
   locals[8] = 34;
   if ( play_drawn == 1 ) {

      npc_attitude = 1;
      say( "Halt! Stranger, why hast thou drawn thy weapon?" );
      locals[9] = 36;
      locals[10] = 37;
      locals[11] = 0;
      locals[30] = babl_menu( 0, &locals[9] );
      switch ( locals[30] ) {

      case 1:

         func_0925();
      break;

      case 2:

      } // end if

   break;

   } // end switch

   if ( private[0] == 0 ) {

      private[3] = 0;
      func_07c8();
   } // end if

   if ( private[2] ) {

      say( "May I help thee, @SS1?" );
      locals[31] = 39;
      locals[32] = 40;
      locals[33] = 41;
      locals[34] = 0;
      locals[52] = babl_menu( 0, &locals[31] );
      switch ( locals[52] ) {

      case 1:

      break;

      case 2:

         goto label_07b7;

      break;

      case 3:

         goto label_07bc;

      break;

      } // end switch

      say( "Carry on then, @SS1." );
      func_0147();
      label_07b7:;

      say( "That's one floor up, @SS1." );
      func_0147();
      label_07bc:;

      say( "That's one floor down, @SS1." );
      func_0147();
   } else {

      func_07c8();
   } // end if

} // end func

void func_07c8() {

   int locals[22];

   private[2] = 0;
   say( "Halt, stranger! Thou art in a secure area! What wouldst thou here?" );
   locals[1] = 46;
   locals[2] = 47;
   locals[3] = 48;
   locals[4] = 49;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_083d();
   break;

   case 2:

      func_083d();
   break;

   case 3:

      func_08fd();
   break;

   case 4:

      func_0925();
   break;

   } // end switch

} // end func

void func_083d() {

   int locals[29];

   say( "What is the password?" );
   locals[2] = 51;
   locals[3] = 52;
   locals[4] = 53;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_090a();
   break;

   case 2:

      func_0979();
   break;

   case 3:

   break;

   } // end switch

   locals[1] = babl_ask( 0 );
   say( "\1@SS1\0" );
   locals[24] = func_0593();
   if ( contains( 2, &locals[1], &locals[24] ) ) {

      private[2] = 1;
      locals[25] = 1;
      locals[26] = 1;
      locals[27] = 0;
      gronk_door( 3, &locals[27], &locals[26], &locals[25] );
      say( "Okay. Go ahead." );
      locals[28] = 43;
      locals[29] = 1;
      x_traps( 2, &locals[29], &locals[28] );
      func_0165();
   } else {

      func_0979();
   } // end if

} // end func

void func_08fd() {

   say( "Thou'rt badly lost -- the kitchen is on the third floor. Thou shouldst not be here." );
   func_0165();
} // end func

void func_090a() {

   int locals[1];

   locals[1] = 57;
   print( 1, &locals[1] );
   say( "You shall not pass here." );
   func_0165();
} // end func

void func_0925() {

   int locals[6];

   say( "Kill @GS35!" );
   locals[1] = 60;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

void func_0979() {

   if ( private[3] < 2 ) {

      say( "That ain't it, humie. I suggest that thou go have a talk with the captain on the fifth floor, and straighten yerself out!" );
      private[3] = private[3] + 1;
      func_0147();
   } else {

      say( "Enough foolin' around. Let's gut this humie!" );
      func_0110();
   } // end if

} // end func

conversation #17
string block 0x0e10, name Janar

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[23];

   private[2] = 1;
   locals[1] = 1;
   print( 1, &locals[1] );
   say( "At last, thou art here. I thought I had been forgotten." );
   locals[2] = 3;
   locals[3] = 4;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_03b5();
   break;

   case 2:

      func_03b5();
   break;

   } // end switch

} // end func

void func_03b5() {

   int locals[44];

   say( "It depends. Art thou my rescuer?" );
   locals[1] = 6;
   locals[2] = 7;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "Say no more of whom thou art - 'tis best that I know not, in case I am captured. I, however, may speak freely. I am Milenus, and once I was the Regent's most trusted advisor in military affairs.  However, I was also the most valuable spy the Resistance had." );
   locals[23] = 9;
   locals[24] = 10;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_05c4();
   break;

   case 2:

      func_0439();
   break;

   } // end switch

} // end func

void func_0439() {

   int locals[22];

   say( "My people had long since betrayed themselves! Ever since our shamans learned of the realities beyond our own, and began to deal with the Red Titan, we have been losing our sovereignty. He has empowered us to conquer this world, but we now rule it in his name, not our own." );
   private[2] = 0;
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0486();
   break;

   case 2:

      func_0516();
   break;

   } // end switch

} // end func

void func_0486() {

   int locals[22];

   say( "Our leaders were seduced by the feeling of routing thine armies and looting thy cities, and have struck an unwise bargain." );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_04ce();
   break;

   case 2:

      func_05c4();
   break;

   } // end switch

} // end func

void func_04ce() {

   int locals[22];

   say( "Indeed they shall, though not by thy hand. Someday soon they shall seek to disobey the Guardian in some matter, and that day they shall know the nature of their "alliance."" );
   locals[1] = 18;
   locals[2] = 19;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0561();
   break;

   case 2:

      func_0516();
   break;

   } // end switch

} // end func

void func_0516() {

   int locals[22];

   say( "If the humans do not triumph here, we shall all fall under the rule of the Guardian. I have no great love for Bishop and his fighters, but I believe they can be made to see reason, and to allow our races to coexist freely." );
   locals[1] = 21;
   locals[2] = 22;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0561();
   break;

   case 2:

   break;

   } // end switch

   say( "'Tis easy for thee to say! When you fight the Guardian, THOU art a hero to thy people. My reward is the contempt of both goblins and humans." );
   func_0561();
} // end func

void func_0561() {

   int locals[23];

   say( "It seems I must be going. I wish thee well, whoever thou art." );
   locals[1] = 25;
   locals[2] = 26;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      remove_talker( 0 );
      func_0165();
   break;

   case 2:

   break;

   } // end switch

   say( "I worked as a spy for ten years. Thinkest thou I learned nothing?" );
   locals[23] = 28;
   print( 1, &locals[23] );
   remove_talker( 0 );
   func_0165();
} // end func

void func_05c4() {

   int locals[43];

   say( "One day, I was at work in the Regent's palace as usual, when a stranger came in, leading behind him a great cat, like no other I had seen before. It sniffed each of us up and down, and when it came to me it stopped and made a high, keening sound. Without a word I was seized and led away, with no explanation." );
   locals[22] = private[2];
   locals[1] = 30;
   locals[23] = 1;
   locals[2] = 31;
   locals[24] = 1;
   locals[3] = 32;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 30:

      func_0439();
   break;

   case 31:

      func_0561();
   break;

   case 32:

      func_04ce();
   break;

   } // end switch

} // end func

conversation #18
string block 0x0e11, name 

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04d9();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[134];

   private[2] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 17;
   locals[3] = 18;
   locals[1] = get_quest( 1, &locals[4] );
   locals[4] = 45;
   if ( private[0] == 0 ) {

      private[3] = 0;
      say( "Ho there, human, art thou hungry? Thou'rt in the right place!" );
      locals[26] = 1;
      locals[5] = 20;
      locals[27] = 1;
      locals[6] = 21;
      locals[28] = 1;
      locals[7] = 22;
      locals[29] = locals[1];
      locals[8] = 23;
      locals[9] = 0;
      locals[47] = babl_fmenu( 0, &locals[5], &locals[26] );
      switch ( locals[47] ) {

      case 20:

         func_0763();
      break;

      case 21:

         func_06bc();
      break;

      case 22:

         func_0763();
      break;

      case 23:

         func_0ae9();
      } // end if

   break;

   } // end switch

   if ( private[3] ) {

      say( "What can I do for thee, human?" );
      locals[69] = locals[1];
      locals[48] = 25;
      locals[70] = 1;
      locals[49] = 26;
      locals[71] = 1;
      locals[50] = 27;
      locals[51] = 0;
      locals[90] = babl_fmenu( 0, &locals[48], &locals[69] );
      switch ( locals[90] ) {

      case 25:

         func_0ae9();
      break;

      case 26:

      break;

      case 27:

         func_0912();
      break;

      } // end switch

      say( "Well, I'm on duty, but I suppose I could look at thy stuff. But none of thy lip this time!" );
      func_035a();
   } // end if

   if ( private[0] ) {

      say( "Ho there, my @GS33, hast thou filled thy belly?" );
      locals[112] = 1;
      locals[91] = 30;
      locals[113] = 1;
      locals[92] = 31;
      locals[114] = 1;
      locals[93] = 32;
      locals[115] = locals[1];
      locals[94] = 33;
      locals[95] = 0;
      locals[133] = babl_fmenu( 0, &locals[91], &locals[112] );
      switch ( locals[133] ) {

      case 30:

      break;

      case 31:

         func_0ad3();
      break;

      case 32:

         func_0b84();
      break;

      case 33:

         func_0ae9();
      } // end if

   break;

   } // end switch

   say( "Remember, thou art welcome to all thou canst find -- I will keep mum!" );
   locals[134] = 3;
   func_0136( &locals[134] );
} // end func

void func_06bc() {

   int locals[22];

   say( "Nay, nay, look in the kitchen, take what thou wouldst! Don't worry, I won't tell, and I'll bet Marcus won't, either! HA HA HA!" );
   locals[1] = 36;
   locals[2] = 37;
   locals[3] = 38;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_0763();
   break;

   case 3:

      func_071b();
   break;

   } // end switch

   say( "I always enjoy taking my shift, here!" );
   func_0763();
} // end func

void func_071b() {

   int locals[22];

   say( "Oh, thou wilt like him. A bit solemn, perhaps, but likable. And Felix is a bit of sour apple." );
   locals[1] = 41;
   locals[2] = 42;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_07ab();
   break;

   case 2:

      func_0763();
   break;

   } // end switch

} // end func

void func_0763() {

   int locals[22];

   say( "We're in the kitchen, friend, my favorite place to be! You see, I'm a distant cousin to the Regent, and so I make sure the captain posts me here as often as possible." );
   locals[1] = 44;
   locals[2] = 45;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0996();
   break;

   case 2:

      func_07ab();
   break;

   } // end switch

} // end func

void func_07ab() {

   int locals[22];

   say( "The servants are...well, they are like you, they are...friends to the goblin race, but somehow not quite such...close friends as thou dost seem to be. Dost thou take my meaning?" );
   locals[1] = 47;
   locals[2] = 48;
   locals[3] = 49;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a17();
   break;

   case 2:

      func_093a();
   break;

   case 3:

      func_0807();
   break;

   } // end switch

} // end func

void func_0807() {

   int locals[24];

   locals[1] = 1000;
   locals[2] = 1;
   if ( find_inv( 2, &locals[2], &locals[1] ) ) {

      say( "Well, thou dost walk armed in this Tower, and surely there are few humans who would be permitted this. Dost thou take my meaning?" );
   } else {

      say( "Well, thou dost walk free and unsupervised in the Tower, and surely there are few humans that would be permitted this. Dost thou take my meaning?" );
   } // end if

   locals[3] = 52;
   locals[4] = 53;
   locals[5] = 54;
   locals[6] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      func_0a17();
   break;

   case 2:

      func_093a();
   break;

   case 3:

      func_0882();
   break;

   } // end switch

} // end func

void func_0882() {

   int locals[22];

   say( "Well, of course you must, else thou art..I mean, you have permission, do you not?" );
   locals[1] = 56;
   locals[2] = 57;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08ca();
   break;

   case 2:

      func_091f();
   break;

   } // end switch

} // end func

void func_08ca() {

   int locals[22];

   say( "HA HA HA, thou hadst me going there a moment, human, indeed thou didst!" );
   locals[1] = 59;
   locals[2] = 60;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0996();
   break;

   case 2:

      func_0912();
   break;

   } // end switch

} // end func

void func_0912() {

   say( "I will see thee later, human." );
   func_0165();
} // end func

void func_091f() {

   int locals[1];

   say( "You mean... thou art... oh." );
   locals[1] = 63;
   print( 1, &locals[1] );
   func_0110();
} // end func

void func_093a() {

   int locals[22];

   say( "I hate to put it crudely, but... you might call them, not so much slaves, as... subordinate allies, you might say. Yes, I think that will do nicely." );
   locals[1] = 65;
   locals[2] = 66;
   locals[3] = 67;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_091f();
   break;

   case 2:

      func_0912();
   break;

   case 3:

      func_0a17();
   break;

   } // end switch

} // end func

void func_0996() {

   int locals[22];

   say( "Our king, of course! He is called the Regent, because technically he rules in the Guardian's name, but the Titan has promised to allow us considerable autonomy." );
   locals[1] = 69;
   locals[2] = 70;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_09de();
   break;

   case 2:

      func_0a17();
   break;

   } // end switch

} // end func

void func_09de() {

   int locals[22];

   say( "I would not call me that, if I were you! I am, after all, the Regent's cousin -- a word from me, and thou couldst find thyself working in the kitchen alongside Marcus.  And now, thou had best run along." );
   private[3] = 1;
   locals[1] = 72;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0156();
   } // end if

} // end func

void func_0a17() {

   int locals[22];

   say( "I see we understand each other. 'Tis a pity, so few humans are able to swallow their nationalistic pride and take part in the reshaping of our world! It is to be hoped that soon more of you will join us." );
   locals[1] = 74;
   locals[2] = 75;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a5f();
   break;

   case 2:

      func_0a77();
   break;

   } // end switch

} // end func

void func_0a5f() {

   int locals[1];

   locals[1] = 76;
   print( 1, &locals[1] );
   func_0110();
} // end func

void func_0a77() {

   int locals[23];

   say( "'Tis true, 'tis true.  This war is a very sad thing." );
   locals[1] = 78;
   print( 1, &locals[1] );
   say( "Well! Enough sentimental talk. Wilt thou have some food?" );
   locals[2] = 80;
   locals[3] = 81;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

   break;

   case 2:

      func_0912();
   break;

   } // end switch

   say( "Thou wilt find it in the kitchen, to the east! I shall be seeing thee." );
   func_0165();
} // end func

void func_0ad3() {

   int locals[1];

   say( "Drop in any time for more, I'll be here! HA! HA! HA!" );
   locals[1] = 3;
   func_0136( &locals[1] );
} // end func

void func_0ae9() {

   int locals[25];

   say( "Got work to do, eh? Well, regulations say I've got to ask you for the codeword." );
   locals[2] = 85;
   locals[3] = 86;
   locals[4] = 87;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      goto label_0b42;

   break;

   case 2:

      func_091f();
   break;

   case 3:

      goto label_0b7c;

   break;

   } // end switch

   label_0b42:;

   locals[1] = babl_ask( 0 );
   say( "\1@SS1\0" );
   locals[24] = 89;
   if ( contains( 2, &locals[1], &locals[24] ) ) {

      say( "Here you go." );
      locals[25] = 140;
      take_from_npc( 1, &locals[25] );
      say( "Say hi to Garg for me!" );
      func_0165();
   } else {

   } // end if

   label_0b7c:;

   say( "Sorry -- no keys for thee!" );
   func_0165();
} // end func

void func_0b84() {

   say( "Why, certainly! 'Tis rare enough that merchants visit this tower." );
   func_035a();
} // end func

conversation #19
string block 0x0e12, name 

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0414();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_0414() {

   int locals[140];

   if ( private[0] == 0 ) {

      say( "And what would ye be wanting, human?" );
      locals[1] = 2;
      locals[2] = 3;
      locals[3] = 4;
      locals[4] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         goto label_04b7;

      break;

      case 2:

         func_0147();
      break;

      case 3:

         goto label_05ea;

      } // end if

   } else {

   break;

   } // end switch

   say( "You again, human? What is it?" );
   locals[23] = 6;
   locals[24] = 7;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_0596;

   break;

   case 2:

      func_0147();
   break;

   } // end switch

   label_04b7:;

   say( "Not without an order from the captain, humie! 'Til then, thou'rt a prisoner!" );
   locals[45] = 9;
   locals[46] = 10;
   locals[47] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

      goto label_04fc;

   break;

   case 2:

      goto label_04f7;

   break;

   } // end switch

   label_04f7:;

   label_04f7:;

   say( "Aye, Borne's on the fifth floor!" );
   func_0147();
   label_04fc:;

   label_04fc:;

   say( "Insist all you like, humie, 'twill do thee no good!" );
   locals[67] = 13;
   locals[68] = 14;
   locals[69] = 0;
   locals[88] = babl_menu( 0, &locals[67] );
   switch ( locals[88] ) {

   case 1:

      goto label_053c;

   break;

   case 2:

      func_0147();
   break;

   } // end switch

   label_053c:;

   label_053c:;

   say( "Help!! It's a breakout!" );
   locals[89] = 16;
   print( 1, &locals[89] );
   locals[90] = 60;
   locals[91] = 1;
   set_quest( 2, &locals[91], &locals[90] );
   locals[92] = 15;
   locals[93] = 15;
   locals[94] = 10001;
   locals[95] = x_clock( 2, &locals[94], &locals[93] ) + 1;
   x_clock( 2, &locals[95], &locals[92] );
   func_0110();
   label_0596:;

   say( "I've heard nothing from the Captain, human, and 'til I do, thou shalt not pass." );
   locals[96] = 18;
   locals[97] = 19;
   locals[98] = 20;
   locals[99] = 0;
   locals[117] = babl_menu( 0, &locals[96] );
   switch ( locals[117] ) {

   case 1:

      goto label_04fc;

   break;

   case 2:

      goto label_04f7;

   break;

   case 3:

      func_0147();
   break;

   } // end switch

   label_05ea:;

   say( "Ye're in the Guardian's Prison Tower, human, and that's where you'll stay, 'til I hear otherwise!" );
   locals[118] = 1;
   func_035a( &locals[118] );
   locals[119] = 22;
   locals[120] = 23;
   locals[121] = 0;
   locals[140] = babl_menu( 0, &locals[119] );
   switch ( locals[140] ) {

   case 1:

      goto label_053c;

   break;

   case 2:

   break;

   } // end switch

   say( "Aye, go on, do!" );
   func_0147();
} // end func

could not find string block 0x0e14.
could not find string block 0x0e15.
could not find string block 0x0e16.
could not find string block 0x0e17.
could not load code ...
conversation #25
string block 0x0e18, name Helena

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[67];

   private[3] = sex( 2, &locals[2], &locals[1] );
   locals[1] = 1;
   locals[2] = 2;
   if ( private[0] == 0 ) {

      private[2] = 1;
      say( "A stranger... a living @GS34! Why come here, to a tomb?" );
      locals[3] = 4;
      locals[4] = 5;
      locals[5] = 6;
      locals[6] = 0;
      locals[24] = babl_menu( 0, &locals[3] );
      switch ( locals[24] ) {

      case 1:

         func_04c7();
      break;

      case 2:

         func_0437();
      break;

      case 3:

         func_0437();
      } // end if

   break;

   } // end switch

   if ( private[0] ) {

      say( "So thou dost return, you who live." );
      locals[46] = private[2];
      locals[25] = 8;
      locals[47] = 1;
      locals[26] = 9;
      locals[27] = 0;
      locals[67] = babl_fmenu( 0, &locals[25], &locals[46] );
      switch ( locals[67] ) {

      case 8:

         func_0557();
      break;

      case 9:

         func_0638();
      } // end if

   break;

   } // end switch

} // end func

void func_0437() {

   int locals[22];

   say( "How long has it been, since we were laid here? A month, a year? My memory has cracked and broken in that time, I remember little save the funeral." );
   locals[1] = 11;
   locals[2] = 12;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0557();
   break;

   case 2:

      func_047f();
   break;

   } // end switch

} // end func

void func_047f() {

   int locals[22];

   say( "Centuries? Surely 'twas just a month or two ago that we buried Praecor Loth here, and I followed soon after. It cannot be much longer, else how could I remember that day so clearly?" );
   locals[1] = 14;
   locals[2] = 15;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0557();
   break;

   case 2:

      func_05f0();
   break;

   } // end switch

} // end func

void func_04c7() {

   int locals[22];

   say( "Britannia? I know it not, though I may have, once. My memories scatter in this long cold, I can recall little save the funeral, when they laid Praecor Loth here. I was alive, then." );
   locals[1] = 17;
   locals[2] = 18;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_050f();
   break;

   case 2:

      func_0557();
   break;

   } // end switch

} // end func

void func_050f() {

   int locals[22];

   say( "I know not, unless it be the strange spell the Company laid on this place, at the funeral." );
   locals[1] = 20;
   locals[2] = 21;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0557();
   break;

   case 2:

      func_05f0();
   break;

   } // end switch

} // end func

void func_0557() {

   int locals[45];

   private[2] = 0;
   locals[1] = 22;
   print( 1, &locals[1] );
   say( "A grand day, 'twas, though sad -- the dead king laid out in all his splendor. I do recall as the slaves bore him down into the tomb, the Three stood weeping, 'round by the liche-gate, and Lethe led the sorcerous chant that rose higher and higher in pitch, 'til some feared to listen, and dogs and horses fled the noise, 'til the chant seemed to swallow sound itself, and the ceremony finished in silent words and silent weeping." );
   locals[2] = 24;
   locals[3] = 25;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

   break;

   case 2:

      func_05f0();
   break;

   } // end switch

   say( "Aye, the Three held power as no other, though in time they too must have fallen. I was i' the earth by then, and know nothing more." );
   locals[24] = 27;
   locals[25] = 28;
   locals[26] = 0;
   locals[45] = babl_menu( 0, &locals[24] );
   switch ( locals[45] ) {

   case 1:

      func_0638();
   break;

   case 2:

      func_05f0();
   break;

   } // end switch

} // end func

void func_05f0() {

   int locals[22];

   say( "I am merely Molloy, the king's tailor, and like the rest of his household I was buried with him when he died. I was handy with a needle, but I claim no great powers of mind." );
   locals[1] = 30;
   locals[2] = 31;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0645();
   break;

   case 2:

      func_0638();
   break;

   } // end switch

} // end func

void func_0638() {

   say( "Farewell." );
   func_0165();
} // end func

void func_0645() {

   int locals[22];

   say( "I know little, as I cannot move far from this place. He will be above this place somewhere, suitably guarded. 'Tis death to seek him, thou canst be sure." );
   locals[1] = 34;
   locals[2] = 35;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0638();
   break;

   case 2:

   break;

   } // end switch

   say( "Then perhaps thou art truly a @GS34 of power." );
   func_0165();
} // end func

conversation #26
string block 0x0e19, name Trystero

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[88];

   if ( private[0] == 0 ) {

      private[2] = 0;
      private[4] = 0;
      private[3] = 1;
      private[5] = 1;
      say( "Thou art not a shade, nor a verminous creature, nor one of Lord Umbria's hybrid grotesques, nor yet one of the soulless automata that walk these halls unthinking." );
      say( "Who art thou?" );
      locals[1] = 3;
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_04c3();
      break;

      case 2:

         func_0529();
      break;

      case 3:

         func_0529();
      } // end if

   break;

   } // end switch

   if ( private[4] ) {

      locals[23] = 6;
      print( 1, &locals[23] );
      func_0156();
   } // end if

   if ( private[0] ) {

      if ( private[2] ) {

         say( "So, the thief would speak with me again!" );
         locals[24] = 8;
         locals[25] = 9;
         locals[26] = 0;
         locals[45] = babl_menu( 0, &locals[24] );
         switch ( locals[45] ) {

         case 1:

            func_0529();
         break;

         case 2:

         break;

         } // end switch

         say( "If thou wouldst speak, speak to the Company of Three!" );
         func_0156();
      } // end if

      say( "So, @GS8, did you not pass the Three?" );
      locals[67] = 1;
      locals[46] = 12;
      locals[68] = 1;
      locals[47] = 13;
      locals[69] = 1;
      locals[48] = 14;
      locals[70] = private[3];
      locals[49] = 15;
      locals[50] = 0;
      locals[88] = babl_fmenu( 0, &locals[46], &locals[67] );
      switch ( locals[88] ) {

      case 12:

         func_098f();
      break;

      case 13:

         func_099c();
      break;

      case 14:

         func_09e7();
      break;

      case 15:

         func_082e();
      } // end if

   break;

   } // end switch

} // end func

void func_04c3() {

   int locals[23];

   say( "A common tomb-thief!" );
   locals[1] = 17;
   print( 1, &locals[1] );
   say( "I had hoped that if any made it this far, 'twould be a better class of person." );
   locals[2] = 19;
   locals[3] = 20;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      goto label_0521;

   break;

   case 2:

   break;

   } // end switch

   say( "Ah, well, if nothing else, the Company of Three shall teach thee manners." );
   private[2] = 1;
   func_0156();
   label_0521:;

   say( "An avatar!" );
   func_0529();
} // end func

void func_0529() {

   int locals[44];

   say( "Know, then, that I was Helena, wife to Praecor Loth, though in death we lie apart. And that though dead these seven long centuries, I still seek thine aid." );
   private[2] = 0;
   locals[1] = 24;
   locals[2] = 25;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0666();
   break;

   case 2:

   break;

   } // end switch

   say( "Look about thee! We do not lie quietly in these tombs -- the power of the Three hath stayed Death's hand a moment, and in that space of time we guttering shadows walk a while, and think of days past." );
   locals[23] = 27;
   locals[24] = 28;
   locals[25] = 29;
   locals[26] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_05c8();
   break;

   case 2:

      func_082e();
   break;

   case 3:

      func_0666();
   break;

   } // end switch

} // end func

void func_05c8() {

   int locals[23];

   locals[1] = 30;
   print( 1, &locals[1] );
   say( "'Twas the Three! Praecor Loth was the best of them, and they could not stand to let him die. They told the others that by following him thus into the grave they would protect his power from the Guardian's thieves, but in truth they preferred to follow him here rather than live leaderless. 'Tis loyalty, of a sort." );
   locals[2] = 32;
   locals[3] = 33;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_082e();
   break;

   case 2:

      func_061e();
   break;

   } // end switch

} // end func

void func_061e() {

   int locals[22];

   say( "To us, he was the fulfillment of every virtue a hero might have. It seemed there was nothing he could not do, no way in which he could fail us. When he fell so suddenly, it shattered our spirit." );
   locals[1] = 35;
   locals[2] = 36;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0666();
   break;

   case 2:

      func_06ae();
   break;

   } // end switch

} // end func

void func_0666() {

   int locals[22];

   say( "Speak with my husband! Go where he lies, past the Company of Three." );
   locals[1] = 38;
   locals[2] = 39;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_06ae();
   break;

   case 2:

      func_082e();
   break;

   } // end switch

} // end func

void func_06ae() {

   int locals[24];

   say( "Only let him speak with one who is alive. Then he shall see through the snares and deceptions they have bound him in.  He was a good man, and shall know his course, I feel sure." );
   locals[1] = 6;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 41;
   locals[4] = 42;
   locals[5] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      func_075d();
   break;

   case 2:

      func_070d();
   break;

   } // end switch

} // end func

void func_070d() {

   int locals[6];

   say( "Thou thinkest me a corpse? Then this is a corpse's curse, @GS8. Go to thy grave a coward!" );
   locals[2] = 44;
   print( 1, &locals[2] );
   locals[3] = 0;
   locals[4] = 0;
   locals[5] = 9999;
   locals[6] = x_skills( 2, &locals[5], &locals[4] ) - 3;
   x_skills( 2, &locals[6], &locals[3] );
   private[4] = 1;
   func_0156();
} // end func

void func_075d() {

   int locals[49];

   say( "Beyond this room wait the Three, in their ragged imitation of life. Their power is second to none in this world -- show them no mercy." );
   locals[1] = 46;
   locals[2] = 47;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_07a5;

   break;

   case 2:

   break;

   } // end switch

   say( "So be it, then." );
   goto label_07e8;

   label_07a5:;

   say( "Of Lethe and Lord Umbria, I know little. Of Morphius, one may expect his usual battery of thieves' tricks -- a poisoned blade, and hidden snares and passages. Thou wouldst do well to hurry, before he senses thy presence in this place." );
   locals[23] = 50;
   locals[24] = 51;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_07e8;

   break;

   case 2:

   break;

   } // end switch

   say( "I certainly shall not fault thee for it -- the bones of those who came before thee shall litter thy path." );
   func_0147();
   label_07e8:;

   label_07e8:;

   say( "Thou hast my thanks, and the thanks of all those here who are kept from their rest. And aye, thou shalt have thy reward, a greater one than canst expect. Go now, brave one, with my blessing." );
   locals[45] = 54;
   print( 1, &locals[45] );
   locals[46] = 0;
   locals[47] = 0;
   locals[48] = 9999;
   locals[49] = x_skills( 2, &locals[48], &locals[47] ) + 1;
   x_skills( 2, &locals[49], &locals[46] );
   func_0165();
} // end func

void func_082e() {

   int locals[44];

   private[3] = 0;
   say( "In life, Lethe, Morphius, and Lord Umbria fought at Praecor Loth's side, rode with him, did great deeds for the realm, before the Guardian came, and before the Final War. And aye, before his passion for the wanton Lethe o'ercame all reason." );
   locals[1] = 56;
   locals[2] = 57;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "The Guardian's forces pressed on and on, driving us back, and when Loth died his empire died with him. Morphius fell back to his old killing ways, Lord Umbria sought salvation in the darkest arts, and the bitch-queen Lethe grew wilder and wilder in her wicked lusts." );
   locals[23] = 59;
   locals[24] = 60;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_0904();
   break;

   case 2:

      func_08b7();
   break;

   } // end switch

} // end func

void func_08b7() {

   int locals[22];

   say( "As our lines fell back, he sought to keep me safe, by sending me further and further north. Not long after word came that he had fallen, I took my own life amid the frozen tundra." );
   private[5] = 0;
   locals[1] = 62;
   locals[2] = 63;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_06ae();
   break;

   case 2:

      func_0904();
   break;

   } // end switch

} // end func

void func_0904() {

   int locals[65];

   say( "Aye, all that remains of the realm you may find between these walls. Thou'rt now in the very court of Praecor Loth." );
   locals[22] = 1;
   locals[1] = 65;
   locals[23] = private[5];
   locals[2] = 66;
   locals[3] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 65:

      func_06ae();
   break;

   case 66:

   break;

   } // end switch

   say( "As our lines fell back, he sought to keep me safe, by sending me further and further north. Not long after word came that he had fallen, I took my own life amid the frozen tundra." );
   private[5] = 0;
   locals[44] = 68;
   locals[45] = 0;
   locals[65] = babl_menu( 0, &locals[44] );
   if ( locals[65] == 1 ) {

      func_06ae();
   } // end if

} // end func

void func_098f() {

   say( "Then go back and tell him the truth! Too long have we been held here in the name of the deception of Praecor Loth!" );
   func_0156();
} // end func

void func_099c() {

   int locals[22];

   say( "Then no one in this world can match their strength. Perhaps one day you shall have sufficient skill." );
   locals[1] = 71;
   locals[2] = 72;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

   break;

   } // end switch

   say( "If you like -- 'tis no shame to be bested by such as they. I wish thee well." );
   func_0147();
} // end func

void func_09e7() {

   say( "I wish thee good fortune." );
   func_0165();
} // end func

conversation #27
string block 0x0e1a, name Trystero

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[47];

   locals[1] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 1;
   locals[3] = 2;
   if ( private[0] == 0 ) {

      private[2] = 0;
   } // end if

   if ( private[2] ) {

   } else {

      if ( private[0] == 0 ) {

      } // end if

      private[2] = 0;
      say( "Begging your pardon, @SS1, but hast thou seen my bones?" );
      locals[4] = 4;
      locals[5] = 5;
      locals[6] = 7;
      locals[7] = 8;
      locals[8] = 0;
      locals[25] = babl_menu( 0, &locals[4] );
      switch ( locals[25] ) {

      case 1:

         func_0461();
      break;

      case 2:

         say( "But @SS1, 'twas not my fault!" );
         func_04a9();
      break;

      case 3:

         private[2] = 1;
         func_057f();
      break;

      case 4:

      } // end if

   break;

   } // end switch

   if ( private[0] ) {

      say( "Hast thou found my bones yet? I'm getting so... wiggly!" );
      locals[26] = 10;
      locals[27] = 11;
      locals[28] = 0;
      locals[47] = babl_menu( 0, &locals[26] );
      switch ( locals[47] ) {

      case 1:

      break;

      case 2:

         func_0454();
      } // end if

   break;

   } // end switch

   say( "Splendid! Give them here, please." );
   func_058c();
} // end func

void func_0454() {

   say( "Please hurry!" );
   func_0165();
} // end func

void func_0461() {

   int locals[22];

   say( "They are long and white, and, if I may say so, very finely shaped! And, last I saw them, they were carrying a jeweled axe. I feel so... vague without them!" );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_04a9();
   break;

   case 2:

      func_04a9();
   break;

   } // end switch

} // end func

void func_04a9() {

   int locals[22];

   say( "I lost them in the time of the last intrusion, several centuries ago -- dost thou recall? The surfacer mages had driven the Three back almost to the second level, until Lethe brought the ceiling down on them. In the resulting crash, I was knocked senseless -- when I awoke, I lacked my infrastructure! Terrible inconvenience, don't you know!" );
   locals[1] = 18;
   locals[2] = 19;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_04f1();
   break;

   case 2:

      func_0542();
   break;

   } // end switch

} // end func

void func_04f1() {

   int locals[23];

   say( "Find them for me, won't you? You may keep anything they may be carrying when you find them." );
   locals[1] = 21;
   locals[2] = 22;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      locals[23] = 3;
      func_0136( &locals[23] );
   break;

   case 2:

      func_057f();
   break;

   } // end switch

} // end func

void func_0542() {

   int locals[23];

   say( "I thank thee! Keep anything the bones may have collected on their own, won't you?" );
   locals[1] = 24;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      locals[23] = 3;
      func_0136( &locals[23] );
   } // end if

} // end func

void func_057f() {

   say( "Very well, then. I shall search elsewhere!" );
   func_0156();
} // end func

void func_058c() {

   int locals[55];

   locals[3] = 26;
   locals[4] = 27;
   locals[5] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      func_0688();
   break;

   case 2:

   break;

   } // end switch

   locals[1] = find_barter( 1, &locals[25] );
   locals[25] = 198;
   locals[26] = 0;
   locals[27] = 0;
   locals[28] = 0;
   locals[29] = 0;
   locals[30] = 0;
   locals[31] = 0;
   locals[32] = 0;
   x_obj_stuff( 9, &locals[32], &locals[31], &locals[30], &locals[29], &locals[28], &locals[2], &locals[27], &locals[26], &locals[1] );
   if ( locals[2] == 62 ) {

      locals[33] = 1;
      give_ptr_npc( 2, &locals[33], &locals[1] );
      func_0695();
   } else {

      say( "But...I do not see them here!" );
      locals[34] = 29;
      locals[35] = 30;
      locals[36] = 0;
      locals[55] = babl_menu( 0, &locals[34] );
      switch ( locals[55] ) {

      case 1:

         func_058c();
      break;

      case 2:

         func_0688();
      } // end if

   break;

   } // end switch

} // end func

void func_0688() {

   say( "Good luck in thy search!" );
   func_0165();
} // end func

void func_0695() {

   int locals[7];

   locals[1] = 27;
   switch_pic( 1, &locals[1] );
   say( "Ahhh. Thank thee, I feel much better now!" );
   locals[2] = 150;
   x_exp( 1, &locals[2] );
   locals[3] = 8;
   locals[4] = 27;
   locals[5] = 1;
   locals[6] = 0;
   transform_talker( 4, &locals[6], &locals[5], &locals[4], &locals[3] );
   locals[7] = 3;
   func_0136( &locals[7] );
} // end func

conversation #28
string block 0x0e1b, name Reef

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   if ( private[0] == 0 ) {

      say( "Ahhhhh! 'Tis now a pleasure to stroll through the tombs!" );
      locals[1] = 2;
      locals[2] = 3;
      locals[3] = 4;
      locals[4] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_046a();
      break;

      case 2:

         func_0480();
      break;

      case 3:

         func_041a();
      } // end if

   break;

   } // end switch

   if ( private[0] ) {

      say( "Greetings, my friend!" );
      locals[23] = 6;
      locals[24] = 7;
      locals[25] = 8;
      locals[26] = 0;
      locals[44] = babl_menu( 0, &locals[23] );
      switch ( locals[44] ) {

      case 1:

         func_046a();
      break;

      case 2:

         func_0480();
      break;

      case 3:

      break;

      } // end switch

      say( "Indeed!" );
      func_041a();
   } // end if

} // end func

void func_041a() {

   int locals[22];

   say( "The only advice I might offer the living is to depart at speed! Many of the dead are disturbed here, and there is little to eat here.  The plants that grow here offer little nourishment, and provoke strange visions in sleep!" );
   locals[1] = 11;
   locals[2] = 12;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0462;

   break;

   } // end switch

   say( "This would be wise of thee!" );
   func_0165();
   label_0462:;

   say( "Well, if thou dost chance to see Praecor Loth, do send my regards. And take care not to lose thy bones!" );
   func_0165();
} // end func

void func_046a() {

   int locals[1];

   say( "Farewell!" );
   locals[1] = 3;
   func_0136( &locals[1] );
} // end func

void func_0480() {

   int locals[22];

   say( "Like most everyone else, I stay near where I was originally buried. I do remember some nice architecture on the first level, and some exquisite statuary... oh, but that was destroyed in the Guardian's last attack. I'm afraid I haven't been of much help." );
   locals[1] = 17;
   locals[2] = 18;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_04c8();
   break;

   case 2:

      func_046a();
   break;

   } // end switch

} // end func

void func_04c8() {

   int locals[1];

   say( "Thou art quite the nicest fellow I have yet encountered in this place! Fare thee well." );
   locals[1] = 3;
   func_0136( &locals[1] );
} // end func

conversation #29
string block 0x0e1c, name Lethe

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[68];

   locals[1] = 1;
   print( 1, &locals[1] );
   say( "Ah, gods, he is slain!" );
   locals[2] = 3;
   locals[3] = 4;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "The king is dead! I saw it! I was the one to see it!" );
   locals[24] = 6;
   locals[25] = 7;
   locals[26] = 0;
   locals[45] = babl_menu( 0, &locals[24] );
   switch ( locals[45] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "'Twas so sudden -- he was distracted -- his lieutenant arriving with news -- he turned his head -- an arrow struck him in the ear -- I do not believe he even felt it happen..." );
   locals[46] = 9;
   locals[47] = 10;
   locals[48] = 0;
   locals[67] = babl_menu( 0, &locals[46] );
   switch ( locals[67] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "He is slain! I was there...!" );
   locals[68] = 12;
   print( 1, &locals[68] );
   npc_goal = 6;
} // end func

conversation #30
string block 0x0e1d, name Morphius

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[110];

   npc_goal = 12;
   if ( private[0] == 0 ) {

      private[2] = get_quest( 1, &locals[1] );
      locals[1] = 6;
      say( "Who has awakened me? A mortal, I see. Then this is it -- you have bested Morphius? And Lord Umbria?" );
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         goto label_03c1;

      break;

      case 2:

      break;

      } // end switch

      say( "I see! So the thief is finally losing his touch! And now, intruder, since thou hast come so far to see me, wouldst thou learn who I once was?" );
      goto label_03c4;

      label_03c1:;

      say( "Then they are at rest, anyways. And now, I am the only one left to maintain the vigil -- the Company of One. Thief, wouldst thou learn who I was?" );
      label_03c4:;

      locals[24] = 6;
      locals[25] = 7;
      locals[26] = 0;
      locals[45] = babl_menu( 0, &locals[24] );
      switch ( locals[45] ) {

      case 1:

      break;

      case 2:

         func_0603();
      break;

      } // end switch

      say( "I was Lethe. They called me Praecor Loth's "general," but that was only a title -- Praecor spotted me one day in an arena fight, and brought me to the palace. From then on I was his private killer, his... mistress, and in death, his guardian." );
      locals[67] = private[2];
      locals[46] = 9;
      locals[68] = 1;
      locals[47] = 10;
      locals[69] = 1;
      locals[48] = 11;
      locals[49] = 0;
      locals[88] = babl_fmenu( 0, &locals[46], &locals[67] );
      switch ( locals[88] ) {

      case 9:

         func_04c1();
      break;

      case 10:

         func_0509();
      break;

      case 11:

         func_0580();
      } // end if

   break;

   } // end switch

   if ( npc_hp < 10 ) {

      func_0610();
   } // end if

   if ( private[0] ) {

      say( "So! The thief returns. Have you decided to try passing me?" );
      locals[89] = 13;
      locals[90] = 14;
      locals[91] = 0;
      locals[110] = babl_menu( 0, &locals[89] );
      switch ( locals[110] ) {

      case 1:

         func_05f6();
      break;

      case 2:

         func_05e9();
      } // end if

   break;

   } // end switch

} // end func

void func_04c1() {

   int locals[22];

   say( "Helena, that bore! Must she always interfere? I buried her far from here, but still she seeks to keep me from him!" );
   locals[1] = 16;
   locals[2] = 17;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0509();
   break;

   case 2:

      func_0509();
   break;

   } // end switch

} // end func

void func_0509() {

   int locals[23];

   say( "Get out! Get out, thief! Can't I live with him just a little longer? Why must you take him away? I know he... he wasn't supposed to be killed, but this way is almost as good. He doesn't have to be dead, even though he wasn't... wasn't supposed to..." );
   locals[1] = 19;
   print( 1, &locals[1] );
   locals[2] = 20;
   locals[3] = 21;
   locals[4] = 22;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0580();
   break;

   case 2:

      func_0573();
   break;

   case 3:

      func_05e9();
   break;

   } // end switch

} // end func

void func_0573() {

   say( "Why expect courtesy from the Guardian's slave?" );
   func_0110();
} // end func

void func_0580() {

   int locals[22];

   say( "We were going to win! He was going to live, to win, not this, not the Guardian driving us north, killing us as we marched! Why did we lose and have to go north and sleep in blankets and build the tomb here, in the frozen lands?" );
   locals[1] = 25;
   locals[2] = 26;
   locals[3] = 27;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_05f6();
   break;

   case 2:

      func_05f6();
   break;

   case 3:

      func_05e9();
   break;

   } // end switch

} // end func

void func_05dc() {

   say( "Am I to believe a thief? The Guardian rules the world above, and ever he sends his servants questing below, for Praecor Loth's horn. And ever they die." );
   func_05f6();
} // end func

void func_05e9() {

   say( "Yes, leave us, please. We must remain together. Tell your master to send his emissaries no more." );
   func_0165();
} // end func

void func_05f6() {

   say( "No, I will not give in. At the least, it will be a pleasure to kill for him again." );
   func_0110();
} // end func

void func_0603() {

   say( "Then die confused and ignorant, thief!" );
   func_0110();
} // end func

void func_0610() {

   int locals[1];

   say( "Please, don't tell him what happened. Lord Umbria said it would work to go and be dead like this. Lord Umbria said we could be with him always like this. But it wasn't right, and I think he knows, I think he knows..." );
   locals[1] = 33;
   print( 1, &locals[1] );
   func_0165();
} // end func

conversation #31
string block 0x0e1e, name Lord Umbria

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[91];

   npc_goal = 12;
   if ( private[0] == 0 ) {

      private[2] = sex( 2, &locals[2], &locals[1] );
      locals[1] = 1;
      locals[2] = 2;
      private[4] = get_quest( 1, &locals[3] );
      locals[3] = 6;
      private[3] = sex( 2, &locals[5], &locals[4] );
      locals[4] = 3;
      locals[5] = 4;
      say( "Set a thief to catch a thief, eh, @GS8?" );
      locals[27] = 1;
      locals[6] = 6;
      locals[28] = 1;
      locals[7] = 7;
      locals[29] = 1;
      locals[8] = 8;
      locals[30] = private[4];
      locals[9] = 9;
      locals[10] = 0;
      locals[48] = babl_fmenu( 0, &locals[6], &locals[27] );
      switch ( locals[48] ) {

      case 6:

         func_06f9();
      break;

      case 7:

         func_0503();
      break;

      case 8:

         func_04b8();
      break;

      case 9:

         func_061b();
      } // end if

   break;

   } // end switch

   if ( private[0] ) {

      say( "So, the thief returns!" );
      locals[70] = 1;
      locals[49] = 11;
      locals[71] = 1;
      locals[50] = 12;
      locals[72] = private[4];
      locals[51] = 13;
      locals[52] = 0;
      locals[91] = babl_fmenu( 0, &locals[49], &locals[70] );
      switch ( locals[91] ) {

      case 11:

         func_07bb();
      break;

      case 12:

         func_07ae();
      break;

      case 13:

         func_07c8();
      } // end if

   break;

   } // end switch

} // end func

void func_04b8() {

   int locals[22];

   say( "'Tis my business to know, @GS33. And are we not in the same business?" );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0503();
   break;

   case 2:

   break;

   } // end switch

   say( "But we are both thieves, are we not?" );
   func_0503();
} // end func

void func_0503() {

   int locals[22];

   say( "I am, or once was, Morphius, by trade a thief, assassin, cracksman, forger, corsair, racketeer, and spy, and now in death a guard in this graveyard!" );
   locals[1] = 19;
   locals[2] = 20;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_054b();
   break;

   case 2:

      func_0558();
   break;

   } // end switch

} // end func

void func_054b() {

   say( "No deals, @GS8." );
   func_0558();
} // end func

void func_0558() {

   int locals[22];

   say( "If you were to... he might..." );
   say( "No, I shall keep you out, surfacer. The Guardian shall not have the treasure of Praecor Loth -- I owe him that much, at any rate." );
   locals[1] = 24;
   locals[2] = 25;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_05a3();
   break;

   case 2:

      func_05a3();
   break;

   } // end switch

} // end func

void func_05a3() {

   int locals[43];

   say( "Praecor Loth met me and pulled me from the gutter. I had skills, yes, but I thought them good for nothing but finding me money to spend, and women when I was lonely. He taught me to fight, and taught me things to fight for. I was already a good thief, the best, really, but with him I became a hero. Now at last I am paying that debt, these seven centuries." );
   locals[22] = 1;
   locals[1] = 27;
   locals[23] = 1;
   locals[2] = 28;
   locals[24] = private[4];
   locals[3] = 29;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 27:

      func_073f();
   break;

   case 28:

      func_0628();
   break;

   case 29:

      func_061b();
   break;

   } // end switch

} // end func

void func_061b() {

   say( "Helena is a liar, and thou art a slave to the Guardian!" );
   func_0670();
} // end func

void func_0628() {

   int locals[22];

   say( "Not dead, not dead! He lives, his soul is alive in his tomb! As long as no one disturbs him, he shall be fine, just as he always was!" );
   locals[1] = 32;
   locals[2] = 33;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0787();
   break;

   case 2:

      func_0670();
   break;

   } // end switch

} // end func

void func_0670() {

   int locals[44];

   say( "Now look, errand-@GS34, thou knowest the rules. You may stay here and die, as thy fellows have for 700 years, or you may run back to your master and bid him disturb us no more!" );
   locals[1] = 35;
   locals[2] = 36;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_07a1();
   break;

   } // end switch

   say( "Art thou sure? Thy fellows, lying 'round thee, might advise thee differently." );
   locals[23] = 38;
   locals[24] = 39;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

   break;

   case 2:

      func_07a1();
   break;

   } // end switch

   say( "So be it!" );
   func_0110();
} // end func

void func_06f9() {

   int locals[22];

   say( "An avatar? Do be serious! Thou'rt nothing more than the Guardian's errand-@GS34, the sort I have been slaying here for generations!" );
   locals[1] = 42;
   locals[2] = 43;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   func_0670();
} // end func

void func_073f() {

   int locals[22];

   say( "Thou'rt merely the hundredth in a series of pawns the Guardian has been moving against us for centuries. We have lost this world to him, and now seek simply to preserve our master as he was, and to protect his treasures." );
   locals[1] = 45;
   locals[2] = 46;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0787();
   break;

   case 2:

      func_0794();
   break;

   } // end switch

} // end func

void func_0787() {

   say( "He must not leave us, for without him we are nothing! WHY DO YOU KEEP TRYING TO TAKE HIM AWAY FROM US?!" );
   func_0110();
} // end func

void func_0794() {

   say( "Guardian, thy stories grow more and more tiresome through the years! Why must thy messengers always tell the same lies?" );
   func_0670();
} // end func

void func_07a1() {

   say( "Thou hast chosen wisely." );
   func_0156();
} // end func

void func_07ae() {

   say( "Say rather, "I am not prepared to listen to the Guardian's lies."" );
   func_07bb();
} // end func

void func_07bb() {

   say( "Thou art a persistent thief, which is the most dangerous kind of all. I must kill thee, but you may take it as a compliment." );
   func_0110();
} // end func

void func_07c8() {

   int locals[22];

   say( "Thou art well-informed, for a stranger to our house, but that shall not save thee. Again I ask thee, will you stay and die, or leave this place forever?" );
   locals[1] = 53;
   locals[2] = 54;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0165();
   break;

   case 2:

      func_0110();
   break;

   } // end switch

} // end func

conversation #32
string block 0x0e1f, name Praecor Loth

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[66];

   npc_goal = 12;
   if ( private[0] == 0 ) {

      private[2] = get_quest( 1, &locals[1] );
      locals[1] = 6;
      say( "A mortal! Then Morphius has fallen. Know that thou art the first in seven centuries to pass the first gate; I would know, then, why thou hast gone to such trouble to die in the second of the three antechambers to Praecor Loth's crypt." );
      locals[23] = 1;
      locals[2] = 2;
      locals[24] = 1;
      locals[3] = 3;
      locals[25] = private[2];
      locals[4] = 4;
      locals[5] = 0;
      locals[44] = babl_fmenu( 0, &locals[2], &locals[23] );
      switch ( locals[44] ) {

      case 2:

         func_044a();
      break;

      case 3:

         func_04a6();
      break;

      case 4:

         func_05a6();
      } // end if

   break;

   } // end switch

   if ( private[0] ) {

      say( "Back again! Have you found your courage, thief?" );
      locals[45] = 6;
      locals[46] = 7;
      locals[47] = 8;
      locals[48] = 0;
      locals[66] = babl_menu( 0, &locals[45] );
      switch ( locals[66] ) {

      case 1:

         func_06ae();
      break;

      case 2:

         func_06a1();
      break;

      case 3:

         func_05b3();
      } // end if

   break;

   } // end switch

} // end func

void func_044a() {

   int locals[22];

   say( "Dost thou, vermin? Aye, so did all the corpses that came before thee! Now flee, and tell thy master we tire of his attentions! The tomb of a great man should not be troubled by such intrusions!" );
   locals[1] = 10;
   locals[2] = 11;
   locals[3] = 12;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0687();
   break;

   case 2:

      func_04a6();
   break;

   case 3:

      func_05b3();
   break;

   } // end switch

} // end func

void func_04a6() {

   int locals[22];

   say( "Britannia... ah, yes, I recall it, Mondain's home! Distasteful man. Wonderful scholar, though, and such a charming wife. Shame about his father. Now why would the Guardian send a slave with such an absurd lie?" );
   locals[1] = 14;
   locals[2] = 15;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_054a();
   break;

   case 2:

      func_04ee();
   break;

   } // end switch

} // end func

void func_04ee() {

   int locals[22];

   say( "Silence! Thou hast violated a sacred place. Will you leave it now, or must I destroy thee?" );
   locals[1] = 17;
   locals[2] = 18;
   locals[3] = 19;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0687();
   break;

   case 2:

      func_0631();
   break;

   case 3:

      func_05b3();
   break;

   } // end switch

} // end func

void func_054a() {

   int locals[22];

   say( "Really, now, do come off it, idiot! Does the Guardian think I am a fool? Now, in the name of Praecor Loth, scuttle back to your master!" );
   locals[1] = 21;
   locals[2] = 22;
   locals[3] = 23;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_05b3();
   break;

   case 2:

      func_04ee();
   break;

   case 3:

      func_06a1();
   break;

   } // end switch

} // end func

void func_05a6() {

   say( "Helena is a liar, and has no understanding of heroism!" );
   func_05b3();
} // end func

void func_05b3() {

   int locals[43];

   say( "Praecor Loth stands for what was... IS best in us, the true nobility of the Three! Since the accident, things have not been... well, Praecor Loth would agree, if he knew what had happened, that this is for the best." );
   locals[22] = 1;
   locals[1] = 26;
   locals[23] = 1;
   locals[2] = 28;
   locals[24] = private[2];
   locals[3] = 29;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 26:

      say( "Never mind that." );
      func_0631();
   break;

   case 28:

      func_0694();
   break;

   case 29:

   break;

   } // end switch

   say( "I tell thee, Helena knows nothing of our way!" );
   func_0631();
} // end func

void func_0631() {

   int locals[23];

   say( "Now I bid thee, leave, here, now, or thou shalt certainly be destroyed. In my time here I have mastered many forbidden practices, and, believe me, to take a life is a trivial matter to me." );
   locals[1] = 32;
   locals[2] = 33;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_0687();
   break;

   } // end switch

   locals[23] = 34;
   print( 1, &locals[23] );
   func_06f4();
} // end func

void func_0687() {

   say( "Farewell." );
   func_0165();
} // end func

void func_0694() {

   say( "No one must see him! If you... no, I shall drive thee from this place!" );
   func_06f4();
} // end func

void func_06a1() {

   say( "I had hoped thy death might take place with some decorum. It would seem not. Halato Akalabeth!" );
   func_06f4();
} // end func

void func_06ae() {

   int locals[22];

   say( "It matters not to me -- I am beyond such petty concerns. Prepare thyself for death." );
   locals[1] = 39;
   locals[2] = 40;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   func_06f4();
} // end func

void func_06f4() {

   int locals[6];

   locals[1] = 46;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   func_0110();
} // end func

conversation #33
string block 0x0e20, name 

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[66];

   if ( private[0] == 0 ) {

      private[3] = 0;
      private[4] = 0;
      private[2] = get_quest( 1, &locals[1] );
      locals[1] = 6;
      say( "Welcome, stranger! I am pleased -- very pleased -- that thou hast come. It has been so long since anyone has visited our humble court. Please, stay awhile here, and be at ease. I am Praecor Loth, King of Rhiannon." );
      locals[23] = 1;
      locals[2] = 2;
      locals[24] = 1;
      locals[3] = 3;
      locals[25] = private[2];
      locals[4] = 4;
      locals[26] = 1;
      locals[5] = 5;
      locals[6] = 0;
      locals[44] = babl_fmenu( 0, &locals[2], &locals[23] );
      switch ( locals[44] ) {

      case 2:

         func_0464();
      break;

      case 3:

         func_0628();
      break;

      case 4:

         func_05bc();
      break;

      case 5:

         func_0541();
      } // end if

   break;

   } // end switch

   if ( private[4] ) {

      say( "Have you changed your mind? Will you do as I ask?" );
      locals[45] = 7;
      locals[46] = 8;
      locals[47] = 0;
      locals[66] = babl_menu( 0, &locals[45] );
      switch ( locals[66] ) {

      case 1:

         func_0821();
      break;

      case 2:

      break;

      } // end switch

      say( "As you wish." );
      func_0165();
   } // end if

   if ( private[0] ) {

      say( "Welcome once again to my court, @GS8." );
      func_0464();
   } // end if

} // end func

void func_0464() {

   int locals[44];

   if ( private[3] > 1 ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   say( "Stay awhile, and tell me why thou hast come here." );
   locals[23] = locals[1];
   locals[2] = 12;
   locals[24] = private[2];
   locals[3] = 13;
   locals[25] = 1;
   locals[4] = 14;
   locals[26] = 1;
   locals[5] = 15;
   locals[6] = 0;
   locals[44] = babl_fmenu( 0, &locals[2], &locals[23] );
   switch ( locals[44] ) {

   case 12:

      func_0912();
   break;

   case 13:

      func_05bc();
   break;

   case 14:

      func_0628();
   break;

   case 15:

      func_050d();
   break;

   } // end switch

} // end func

void func_050d() {

   int locals[22];

   say( "So soon? Well, if you must. It is so lonely here! I wish thee well, and bid thee know that thou hast always a place at my court." );
   locals[1] = 17;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0165();
   } // end if

} // end func

void func_0541() {

   int locals[43];

   say( "Dead? What dost thou mean? No, of course I am not dead. Who told thee such a thing?" );
   locals[22] = 1;
   locals[1] = 19;
   locals[23] = private[2];
   locals[2] = 20;
   locals[24] = 1;
   locals[3] = 21;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 19:

   break;

   case 20:

      func_05bc();
   break;

   case 21:

      func_08ca();
   break;

   } // end switch

   say( "Another rumor! Some people will believe anything they are told!" );
   func_0464();
} // end func

void func_05bc() {

   int locals[22];

   say( "My lovely wife! How is Helena? She is... they tell me she is indisposed? How did she seem to you?" );
   locals[1] = 24;
   locals[2] = 25;
   locals[3] = 26;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0628();
   break;

   case 2:

   break;

   case 3:

      func_061b();
   break;

   } // end switch

   say( "Excellent!" );
   func_0464();
} // end func

void func_061b() {

   say( "Dead, Helena? Why of course not, she has merely been ill, these past... I cannot remember how long. But I am assured she is fine, and will soon be well again. My dear Helena!" );
   func_0464();
} // end func

void func_0628() {

   int locals[22];

   say( "Why, yes, we'd been having some trouble with the... Guardian, wasn't it? But now, I remember, wait, it seems that was a long time ago... didn't... it must be over now, surely. And peace reigns again in my realm!" );
   private[3] = 1;
   locals[1] = 30;
   locals[2] = 31;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0675();
   break;

   case 2:

      func_0464();
   break;

   } // end switch

} // end func

void func_0675() {

   int locals[24];

   locals[1] = 32;
   print( 1, &locals[1] );
   private[3] = 2;
   say( "Surely, you must be joking, @GS8! We, I'm sure of it... the fighting at Rhyna... was I... wounded? I can't remember! We did defeat his armies, didn't we? We must have!" );
   locals[2] = 34;
   print( 1, &locals[2] );
   locals[3] = 35;
   locals[4] = 36;
   locals[5] = 37;
   locals[6] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      func_08ca();
   break;

   case 2:

      func_06f2();
   break;

   case 3:

      func_05bc();
   break;

   } // end switch

} // end func

void func_06f2() {

   int locals[22];

   say( "No, I won, I...wait, what is this place...this stone, is this my palace? I don't recognize this room! Where am I?" );
   private[3] = 3;
   locals[1] = 39;
   locals[2] = 40;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08ca();
   break;

   case 2:

      func_073f();
   break;

   } // end switch

} // end func

void func_073f() {

   int locals[22];

   say( "And Helena? My companions? Where are they? Are they near?" );
   private[3] = 4;
   locals[1] = 42;
   locals[2] = 43;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_078c();
   break;

   case 2:

      func_08ca();
   break;

   } // end switch

} // end func

void func_078c() {

   int locals[22];

   say( "I... I had known that things were somehow... not right, but... I was deceived, the Three deceived me, didn't they? Doubtless they thought themselves kind. I am so tired, but first, there is one thing I must tell thee." );
   locals[1] = 45;
   locals[2] = 46;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0821();
   break;

   case 2:

      func_07d4();
   break;

   } // end switch

} // end func

void func_07d4() {

   int locals[22];

   say( "Do as you will, then. I must not sleep, not until another comes, who may bear the horn." );
   private[4] = 1;
   locals[1] = 48;
   locals[2] = 49;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0821();
   break;

   case 2:

      func_0147();
   break;

   } // end switch

} // end func

void func_0821() {

   int locals[12];

   say( "In my war against the Guardian, I carried a mighty battle-horn, whose blast could shatter buildings and turn back great armies.\m 'Twas my greatest weapon in battle, once, but to wield it requires great strength in the lungs -- few can attain such strength, save by sorcerous means.\m" );
   say( "In the proper hands, its power is enormous. Someone such as thyself, strong and unafraid of the truth, must wield it when I am gone. I trust you to do so, now..." );
   locals[1] = 273;
   take_from_npc( 1, &locals[1] );
   locals[2] = 52;
   print( 1, &locals[2] );
   say( "Oh! I feel now as if I were dissolving in warm water... it is so restful... and I feel my long saga... has ended." );
   locals[3] = 54;
   print( 1, &locals[3] );
   locals[4] = 7;
   locals[5] = 1;
   set_quest( 2, &locals[5], &locals[4] );
   locals[6] = 107;
   locals[7] = 1;
   set_quest( 2, &locals[7], &locals[6] );
   locals[8] = 2500;
   x_exp( 1, &locals[8] );
   locals[9] = 15;
   locals[10] = 15;
   locals[11] = 10001;
   locals[12] = x_clock( 2, &locals[11], &locals[10] ) + 1;
   x_clock( 2, &locals[12], &locals[9] );
   func_0147();
} // end func

void func_08ca() {

   int locals[22];

   say( "HA HA HA HA HA! Oh, you had me going, @GS8, I swear, I did believe every word of it! Helena, did you... oh, she is gone, yes, I remember it now! But indeed, Avatar, thou art a jester of formidable talent!" );
   locals[1] = 56;
   locals[2] = 57;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0912();
   break;

   case 2:

      func_0464();
   break;

   } // end switch

} // end func

void func_0912() {

   int locals[23];

   locals[1] = private[3];
   if ( 2 == locals[1] ) {

      say( "You say the Guardian conquered...why, it's absurd!" );
      func_0675();
   } else {

      if ( 3 == locals[1] ) {

         say( "I was... killed, you say? No, how can..." );
         func_073f();
      } else {

         if ( 4 == locals[1] ) {

            say( "What do you mean? My wife, my friends are dead?" );
            locals[2] = 61;
            locals[3] = 62;
            locals[4] = 0;
            locals[23] = babl_menu( 0, &locals[2] );
            switch ( locals[23] ) {

            case 1:

               func_078c();
            break;

            case 2:

               func_0464();
            break;

            } // end switch

         } // end if

      } // end if

   } // end if

} // end func

could not load code ...
conversation #35
string block 0x0e22, name 

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[334];

   locals[1] = 1;
   locals[2] = func_0874();
   if ( private[0] == 0 ) {

      private[2] = 0;
      say( "Hail, brave comrade! 'Tis a long time since one of our own hath ventured here below." );
      locals[3] = 2;
      locals[4] = 3;
      locals[5] = 4;
      locals[6] = 5;
      locals[7] = 0;
      locals[24] = babl_menu( 0, &locals[3] );
      switch ( locals[24] ) {

      case 1:

         goto label_052d;

      break;

      case 2:

         goto label_046e;

      break;

      case 3:

         goto label_0726;

      break;

      case 4:

         goto label_052d;

      } // end if

   } else {

   break;

   } // end switch

   say( "What brings thee back here, surfacer?" );
   locals[46] = private[2];
   locals[25] = 7;
   locals[47] = 1;
   locals[26] = 8;
   locals[48] = 1;
   locals[27] = 9;
   locals[49] = locals[1];
   locals[28] = 10;
   locals[29] = 0;
   locals[67] = babl_fmenu( 0, &locals[25], &locals[46] );
   switch ( locals[67] ) {

   case 7:

      goto label_086c;

   break;

   case 8:

      func_0147();
   break;

   case 9:

      goto label_063e;

   break;

   case 10:

      goto label_052d;

   break;

   } // end switch

   label_046e:;

   say( "Maybe a hundred years, since last the Guardian found one who would brave these dangers! And that one fell to the metal man on the first level. Pounded quite flat, he was." );
   locals[68] = 12;
   locals[69] = 13;
   locals[70] = 14;
   locals[71] = 15;
   locals[72] = 0;
   locals[89] = babl_menu( 0, &locals[68] );
   switch ( locals[89] ) {

   case 1:

      goto label_04d6;

   break;

   case 2:

      goto label_05f8;

   break;

   case 3:

      goto label_052d;

   break;

   case 4:

      goto label_0726;

   break;

   } // end switch

   label_04d6:;

   label_04d6:;

   label_04d6:;

   say( "I prepared well for the perils herein. According to the Guardian's guidance, I equipped myself with various potions; a poison antidote, a flameproofing, and an iron flesh. All were purchased at high price from the most reputable merchants.  Yet when I found myself poisoned, some agent had spoiled my curative, and I fell." );
   locals[90] = 17;
   locals[91] = 18;
   locals[92] = 19;
   locals[93] = 0;
   locals[111] = babl_menu( 0, &locals[90] );
   switch ( locals[111] ) {

   case 1:

   break;

   case 2:

      goto label_0726;

   break;

   case 3:

      goto label_05f8;

   break;

   } // end switch

   say( "I fear all were lost when I stumbled into the water, else I would not begrudge them to you.  They are useless to me, now." );
   goto label_07d9;

   label_052d:;

   label_052d:;

   label_052d:;

   label_052d:;

   label_052d:;

   locals[1] = 0;
   say( "Why, I was called Silanus, like you a good servant in the Guardian's army, 'til I volunteered to come here below, hoping to win His favor by bringing the horn back to the surface." );
   locals[112] = 22;
   locals[113] = 23;
   locals[114] = 24;
   locals[115] = 25;
   locals[116] = 0;
   locals[133] = babl_menu( 0, &locals[112] );
   switch ( locals[133] ) {

   case 1:

      goto label_05f8;

   break;

   case 2:

      goto label_04d6;

   break;

   case 3:

      goto label_05fb;

   break;

   case 4:

      goto label_059a;

   break;

   } // end switch

   label_059a:;

   if ( locals[2] ) {

      say( "Strange! Thou dost wear his sign upon thy hand!" );
   } else {

      say( "Nor do I, now -- I bear thee no ill-will. Such things seem less to me now, than they did." );
   } // end if

   locals[134] = 28;
   locals[135] = 29;
   locals[136] = 30;
   locals[137] = 0;
   locals[155] = babl_menu( 0, &locals[134] );
   switch ( locals[155] ) {

   case 1:

      goto label_05fb;

   break;

   case 2:

      goto label_04d6;

   break;

   case 3:

      goto label_05f8;

   break;

   } // end switch

   label_05f8:;

   label_05f8:;

   label_05f8:;

   label_05f8:;

   say( "Why, the Horn of Praecor Loth!" );
   label_05fb:;

   label_05fb:;

   say( "A blast from that horn could shake a castle to its foundations, or stun an army in its tracks. Only one man could wind it, and that was Loth himself." );
   locals[156] = 33;
   locals[157] = 34;
   locals[158] = 0;
   locals[177] = babl_menu( 0, &locals[156] );
   switch ( locals[177] ) {

   case 1:

      goto label_063e;

   break;

   case 2:

   break;

   } // end switch

   say( "The horn lies with its master!" );
   goto label_0796;

   label_063e:;

   label_063e:;

   say( "I saw him, once, across a battlefield -- tall and straight as a great pine, he was, and when he raised the horn to his lips all of us would turn away and cower from the blast! With the Three fighting at his side, he seemed invincible!" );
   locals[178] = 37;
   locals[179] = 38;
   locals[180] = 39;
   locals[181] = 0;
   locals[199] = babl_menu( 0, &locals[178] );
   switch ( locals[199] ) {

   case 1:

      goto label_0692;

   break;

   case 2:

      goto label_06e6;

   break;

   case 3:

      goto label_0796;

   break;

   } // end switch

   label_0692:;

   say( "His companions! A tall, thin, one, with a crooked smile and a blade that whipped about him like a snake! Then a shorter man, a wizard who commanded a company of terrible dark creatures. And there was the woman who grinned and snarled as she killed, but so beautiful she made grizzled veterans stare." );
   locals[200] = 41;
   locals[201] = 42;
   locals[202] = 43;
   locals[203] = 0;
   locals[221] = babl_menu( 0, &locals[200] );
   switch ( locals[221] ) {

   case 1:

      goto label_0726;

   break;

   case 2:

      goto label_0796;

   break;

   case 3:

      goto label_06e6;

   break;

   } // end switch

   label_06e6:;

   label_06e6:;

   say( "'Tis said an arrow took him in its flight, shot by that young Thibris, a favorite of the Guardian." );
   locals[222] = 45;
   locals[223] = 46;
   locals[224] = 0;
   locals[243] = babl_menu( 0, &locals[222] );
   switch ( locals[243] ) {

   case 1:

      goto label_0796;

   break;

   case 2:

      goto label_07d9;

   break;

   } // end switch

   label_0726:;

   label_0726:;

   label_0726:;

   label_0726:;

   say( "I reached almost the full extent of this building! I crossed through a maze on the third floor, more by luck than by my wits. But afterwards my luck ran out -- a skeleton nicked me with its sword, and from the poison in its blade I fell sick and died." );
   locals[265] = 1;
   locals[244] = 48;
   locals[266] = 1;
   locals[245] = 49;
   locals[267] = locals[1];
   locals[246] = 50;
   locals[247] = 0;
   locals[286] = babl_fmenu( 0, &locals[244], &locals[265] );
   switch ( locals[286] ) {

   case 48:

      goto label_0796;

   break;

   case 49:

      goto label_07d9;

   break;

   case 50:

      goto label_052d;

   break;

   } // end switch

   label_0796:;

   label_0796:;

   label_0796:;

   label_0796:;

   label_0796:;

   say( "He lies on the highest level of this structure, but 'tween him and thee stand terrible machines of slaughter -- fire and moving floors, and worse! 'Tis said there was once a map of these dangers, but that it was split into pieces and hidden in the tomb." );
   locals[287] = 52;
   locals[288] = 53;
   locals[289] = 0;
   locals[308] = babl_menu( 0, &locals[287] );
   switch ( locals[308] ) {

   case 1:

   break;

   case 2:

      goto label_07d9;

   break;

   } // end switch

   say( "This would be wise." );
   goto label_07d9;

   label_07d9:;

   label_07d9:;

   label_07d9:;

   label_07d9:;

   label_07d9:;

   say( "'Twould serve thee best to turn back now, but if thou wouldst press on, I wish thee well." );
   if ( locals[2] ) {

      say( "Well, I see by thy ring thou dost serve the same master I once did." );
   } else {

      locals[309] = 15;
      locals[310] = 9999;
      if ( x_skills( 2, &locals[310], &locals[309] ) > 0 ) {

      } else {

         locals[311] = 11;
         locals[312] = 9999;
         if ( x_skills( 2, &locals[312], &locals[311] ) > 0 ) {

         } else {

            func_0147();
         } // end if

      } // end if

   } // end if

   private[2] = 1;
   say( "Let me offer thee some advice! When I set out, the Guardian entrusted to me a key that would have allowed me to pass two of Loth's three guardian-liches, had I lived so long. I lost it as I wandered here, delirious from the poison that killed me." );
   locals[313] = 58;
   locals[314] = 59;
   locals[315] = 0;
   locals[334] = babl_menu( 0, &locals[313] );
   switch ( locals[334] ) {

   case 1:

      goto label_086c;

   break;

   case 2:

   break;

   } // end switch

   say( "'Twas a war prize, looted from the slaughter of Loth's ministers!" );
   label_086c:;

   label_086c:;

   say( "It lies somewhere in the northeastern quarter of that maze. I remember falling into water, just after evading a pit that opened under my feet. I swam a little to the west, then hit a hidden switch by accident, which opened a hidden door. I crawled inside and died there. I hope this helps thee." );
   func_0147();
} // end func

void func_0874() {

   int locals[2];

   locals[2] = 10;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_088e;

   label_088e:;

   return locals[1];
} // end func

could not find string block 0x0e24.
could not find string block 0x0e25.
could not find string block 0x0e26.
could not find string block 0x0e27.
could not load code ...
conversation #41
string block 0x0e28, name Lobar

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05b9();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_0414() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_04c7();
      break;

      case 2:

         func_0521();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_04c7() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0521() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_0593() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_05b9() {

   int locals[101];

   locals[1] = 0;
   locals[2] = 0;
   locals[3] = 0;
   locals[6] = 50;
   if ( get_quest( 1, &locals[6] ) ) {

      func_0593();
   } // end if

   locals[5] = sex( 2, &locals[8], &locals[7] );
   locals[7] = 18;
   locals[8] = 19;
   locals[9] = 2;
   func_035a( &locals[9] );
   if ( private[0] == 0 ) {

      locals[4] = 0;
   } // end if

   switch ( locals[4] ) {

   case 0:

      locals[4] = get_quest( 1, &locals[10] );
      locals[10] = 123;
   break;

   case 1:

      say( "I heard of thy training accident with Captain Relk, @SS5! He was no favorite among the Guard, I tell thee that! Why, the beatings he used to give out..." );
      say( "At any rate, I wish thee to know that we of the guard bear thee no ill will -- such accidents will happen. Relk never did pull his punches much in a sparring match, 'tis true. 'Twill be an easier regime under Lobar!" );
      locals[4] = 2;
      func_0156();
   break;

   locals[11] = 1;
   locals[12] = 10001;
   x_clock( 2, &locals[12], &locals[11] ) >= 14;  // expr. has value on stack!
   say( "Welcome to Killorn Keep, @SS5! 'Tis a very exciting time, here!" );
   locals[13] = 23;
   locals[14] = 24;
   locals[15] = 0;
   locals[34] = babl_menu( 0, &locals[13] );
   switch ( locals[34] ) {

   case 1:

   break;

   case 2:

      goto label_075b;

   break;

   } // end switch

   say( "The invasion! Troops have been arriving daily by airship!" );
   locals[35] = 26;
   locals[36] = 27;
   locals[37] = 28;
   locals[38] = 0;
   locals[56] = babl_menu( 0, &locals[35] );
   switch ( locals[56] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

   break;

   } // end switch

   say( "I know not, @SS5. I have been told nothing, and even the soldiers themselves know little of their mission." );
   locals[57] = 30;
   locals[58] = 31;
   locals[59] = 0;
   locals[78] = babl_menu( 0, &locals[57] );
   switch ( locals[78] ) {

   case 1:

   break;

   case 2:

      func_0165();
   break;

   } // end switch

   func_00bd( &locals[3], &locals[2], &locals[1] );
   if ( 18 <= locals[1] && locals[1] <= 25 && 34 <= locals[2] && locals[2] <= 40 ) {

      say( "Why, right here, in the barracks!" );
   } else {

      say( "You'll find 'em in the barracks, @SS5. Good luck!" );
   } // end if

   func_0165();
   label_075b:;

   say( "Now that the invasion's starting, we're finally seeing some real action!" );
   } // end switch

   locals[79] = 35;
   print( 1, &locals[79] );
   say( "Welcome, traveler, to fabulous Killorn Keep, Marvel of the Northern Wasteland, testament to the great Guardian's power and wisdom. Yes, you won't believe your eyes. The keep actually hovers 1257 feet above the sands of the Krain desert, maintaining our military supremacy in this area. We invite you to refresh yourself at our pub to your northeast." );
   locals[80] = 37;
   locals[81] = 38;
   locals[82] = 39;
   locals[83] = 40;
   locals[84] = 0;
   locals[101] = babl_menu( 0, &locals[80] );
   switch ( locals[101] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

      func_07e7();
   break;

   case 4:

      func_07da();
   break;

   } // end switch

   say( "If you have any questions, suggestions, or complaints, please address them to Mystell, whose office lies to the northwest." );
   func_07da();
} // end func

void func_07da() {

   say( "Enjoy your stay." );
   func_0147();
} // end func

void func_07e7() {

   say( "Why not? Little else to do, in this wretched keep!" );
   func_0414();
} // end func

conversation #42
string block 0x0e29, name Kintara

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0380();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_0380() {

   int locals[93];

   locals[1] = 50;
   if ( get_quest( 1, &locals[1] ) ) {

      func_035a();
   } // end if

   if ( private[0] == 0 ) {

      locals[2] = 2;
      print( 1, &locals[2] );
   } // end if

   private[10] = 1;
   private[2] = 0;
   private[3] = 0;
   private[9] = 1;
   private[7] = 1;
   private[6] = 1;
   private[8] = 1;
   private[4] = 0;
   private[5] = 0;
   say( "Ho, there, stranger! Sit and have a drink with me." );
   locals[3] = 4;
   locals[4] = 5;
   locals[5] = 6;
   locals[6] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      func_05da();
   break;

   case 2:

      private[4] = 1;
      func_0574();
   break;

   case 3:

      func_05da();
   } // end if

break;

} // end switch

if ( private[4] ) {

} else {

   if ( private[2] ) {

      if ( private[3] ) {

         say( "Well, I was angry with you, but I'm not sure I'll make an issue of it, if you'll apologize. What do you say?" );
         locals[25] = 8;
         locals[26] = 9;
         locals[27] = 0;
         locals[46] = babl_menu( 0, &locals[25] );
         switch ( locals[46] ) {

         case 1:

         break;

         case 2:

            goto label_048d;

         break;

         } // end switch

         say( "And I am sorry I was so quick to anger!" );
         npc_attitude = 3;
         goto label_04df;

         label_048d:;

         private[3] = 0;
         say( "Well, sorry to hear it -- henceforth we are no longer friends! Thou'rt a stranger to me!" );
         func_0156();
      } // end if

      say( "Why're you bothering me again?" );
      locals[47] = 13;
      locals[48] = 14;
      locals[49] = 0;
      locals[68] = babl_menu( 0, &locals[47] );
      switch ( locals[68] ) {

      case 1:

      break;

      case 2:

         func_0574();
      break;

      } // end switch

      say( "Well, I reckon we could talk a little, anyway." );
      func_076f();
   } // end if

   if ( private[0] ) {

      label_04df:;

      label_04df:;

      locals[69] = 1;
      locals[70] = 10001;
      if ( x_clock( 2, &locals[70], &locals[69] ) >= 14 ) {

         func_0ea6();
      } // end if

      locals[71] = 123;
      if ( get_quest( 1, &locals[71] ) ) {

         if ( private[6] ) {

            private[6] = 0;
            func_1108();
         } // end if

      } // end if

      say( "'Tis good to see thee again." );
      locals[72] = 17;
      locals[73] = 18;
      locals[74] = 19;
      locals[75] = 0;
      locals[93] = babl_menu( 0, &locals[72] );
      switch ( locals[93] ) {

      case 1:

         func_0d4e();
      break;

      case 2:

         func_0d33();
      break;

      case 3:

         func_08aa();
      } // end if

   break;

   } // end switch

   goto label_04df;

} // end func

void func_0574() {

   say( "Suit thyself!" );
   func_0147();
} // end func

void func_0581() {

   int locals[22];

   locals[1] = 21;
   locals[2] = 22;
   locals[3] = 23;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0d4e();
   break;

   case 2:

      func_0d33();
   break;

   case 3:

      func_08aa();
   break;

   } // end switch

} // end func

void func_05da() {

   int locals[23];

   locals[1] = 24;
   print( 1, &locals[1] );
   say( "Nay, tell me not thy name, stranger, and I shall withhold mine -- I would speak freely with thee, without fear of being informed upon! I serve under Relk these days, so I've had enough o' that." );
   locals[2] = 26;
   locals[3] = 27;
   locals[4] = 28;
   locals[5] = 29;
   locals[6] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_076f();
   break;

   case 2:

      func_0713();
   break;

   case 3:

      func_06b4();
   break;

   case 4:

      func_0658();
   break;

   } // end switch

} // end func

void func_0658() {

   int locals[22];

   say( "'Tis no matter -- those who know me are too much in fear of my sword to speak against me!" );
   locals[1] = 31;
   locals[2] = 32;
   locals[3] = 33;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_095e();
   break;

   case 2:

      func_095e();
   break;

   case 3:

      func_076f();
   break;

   } // end switch

} // end func

void func_06b4() {

   int locals[22];

   say( "Aye, treason! Why not? I've no more truck with the Eight Virtues -- Drunkenness is my One Virtue now, and I its Avatar. He's taken all the others from me!" );
   locals[1] = 35;
   locals[2] = 36;
   locals[3] = 37;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_076f();
   break;

   case 2:

      func_0862();
   break;

   case 3:

   break;

   } // end switch

   say( "The Guardian! The red bastard with the dental problem!" );
   func_0862();
} // end func

void func_0713() {

   int locals[22];

   say( "Indeed, excellence in all things has been my downfall! I was once a scholar of philosophy, before I was discovered to be a man of greatness." );
   locals[1] = 40;
   locals[2] = 41;
   locals[3] = 42;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_095e();
   break;

   case 2:

      func_076f();
   break;

   case 3:

      func_0862();
   break;

   } // end switch

} // end func

void func_076f() {

   int locals[45];

   if ( private[5] ) {

      say( "Well, I won't bore thee with the story of my life again, but I think thou dost understand my sentiments on the subject!" );
      locals[1] = 44;
      locals[2] = 45;
      locals[3] = 46;
      locals[4] = 47;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_0d4e();
      break;

      case 2:

         func_0d33();
      break;

      case 3:

         func_08aa();
      break;

      case 4:

         func_09b6();
      } // end if

   break;

   } // end switch

   say( "I shall teach thee the reason why I drink. 'Tis a long tale -- wouldst thou hear it?" );
   locals[23] = 49;
   locals[24] = 50;
   locals[25] = 51;
   locals[26] = 52;
   locals[27] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_095e();
   break;

   case 2:

      func_0862();
   break;

   case 3:

      func_0caf();
   break;

   case 4:

   break;

   } // end switch

   say( "If you must..." );
   locals[45] = 54;
   print( 1, &locals[45] );
   private[2] = 1;
   func_0156();
} // end func

void func_0862() {

   int locals[22];

   say( "Th'way I figure it, what's a virtue when it's made a law? Obedience, 's all it is! 'Course obedience is the third virtue anyway, so whassit matter?" );
   locals[1] = 56;
   locals[2] = 57;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08aa();
   break;

   case 2:

      func_0713();
   break;

   } // end switch

} // end func

void func_08aa() {

   int locals[46];

   locals[1] = 9;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   say( "The Guardian's virtues, of which I am clearly a living embodiment, are: Sobriety, punctuality, obedience, vigilance, conformity, efficiency, silence, and diligence! Bit of a colorless crew, eh?" );
   locals[3] = 59;
   locals[4] = 60;
   locals[5] = 61;
   locals[6] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

   break;

   case 2:

      func_076f();
   break;

   case 3:

      func_0d33();
   break;

   } // end switch

   say( "I don't think you mean the kind of virtue we deal in around here." );
   locals[25] = 63;
   locals[26] = 64;
   locals[27] = 0;
   locals[46] = babl_menu( 0, &locals[25] );
   switch ( locals[46] ) {

   case 1:

      func_076f();
   break;

   case 2:

   break;

   } // end switch

   say( "Well, thou'rt a lucky fellow!" );
   func_0581();
} // end func

void func_095e() {

   int locals[22];

   say( "To make my point, I'll have to say my name: Lobar! Know it?" );
   locals[1] = 67;
   locals[2] = 68;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_09a9();
   break;

   case 2:

   break;

   } // end switch

   say( "I should expect so!" );
   func_09b6();
} // end func

void func_09a9() {

   say( "What, hast thou spent thy whole life in the Styx?" );
   func_09b6();
} // end func

void func_09b6() {

   int locals[22];

   say( "I won the Empire's duelling competition for four years straight. Remember me now? This was five years ago. I was 20 years old, the talk of the capitol! They called me "the Young Mors Gotha." God, I was fast, then!" );
   locals[1] = 72;
   locals[2] = 73;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a32();
   break;

   case 2:

      func_09fe();
   break;

   } // end switch

} // end func

void func_09fe() {

   int locals[22];

   say( "The Guardian's pet killer. Met her once, long time ago, even beat her once in a sparring match! Didn't care for her much, but she could handle a blade!" );
   locals[1] = 75;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0a32();
   } // end if

} // end func

void func_0a32() {

   int locals[22];

   say( "I started getting the "inner voice," the one they say comes to favored servants of the Guardian. You know it? He wanted me to kill people for him. I dunno why -- removing dissidents, I guess, or maybe just to show off that he had an unbeatable fencer in his pocket." );
   locals[1] = 77;
   locals[2] = 78;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a7a();
   break;

   case 2:

      func_0a7a();
   break;

   } // end switch

} // end func

void func_0a7a() {

   int locals[66];

   say( "It turns out he can do more than talk -- made it rough for me for a while. Still does, when I'm sober -- drinking's the only thing that holds him off! If I own one thing in this world, it's my swordarm. I'm the best there is, and I worked to get that way, and I'll be damned if that Red Bastard will make me his toy." );
   private[5] = 1;
   if ( private[3] ) {

      locals[1] = 80;
      locals[2] = 81;
      locals[3] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

      break;

      case 2:

         func_0caf();
      break;

      } // end switch

      say( "Aye, and costly." );
      locals[23] = 83;
      locals[24] = 84;
      locals[25] = 85;
      locals[26] = 0;
      locals[44] = babl_menu( 0, &locals[23] );
      switch ( locals[44] ) {

      case 1:

         func_0d4e();
      break;

      case 2:

         func_0d33();
      break;

      case 3:

         func_08aa();
      } // end if

   } else {

   break;

   } // end switch

   locals[45] = 86;
   locals[46] = 87;
   locals[47] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

      func_0b5d();
   break;

   case 2:

      func_0caf();
   break;

   } // end switch

} // end func

void func_0b5d() {

   int locals[44];

   private[2] = 0;
   private[3] = 1;
   say( "Dost thou? 'Tis rare that I find one who understands the worth of such things, particularly since I've been exiled to this backwater! May we, then, be friends?" );
   locals[1] = 75;
   x_exp( 1, &locals[1] );
   locals[23] = 1;
   locals[2] = 89;
   locals[24] = 1;
   locals[3] = 90;
   locals[25] = 1;
   locals[4] = 91;
   locals[26] = private[10];
   locals[5] = 92;
   locals[6] = 0;
   locals[44] = babl_fmenu( 0, &locals[2], &locals[23] );
   switch ( locals[44] ) {

   case 89:

      func_0d4e();
   break;

   case 90:

      func_0d33();
   break;

   case 91:

      func_0caf();
   break;

   case 92:

      func_0c09();
   break;

   } // end switch

} // end func

void func_0c09() {

   int locals[44];

   locals[1] = 1;
   say( "A stranger such as thyself must be wary of Mystell! If thou hast no good reason to be aboard, she will almost certainly suspect thee as a spy. She already has a campaign going against that stuck-up mage Altara!" );
   private[10] = 0;
   label_0c1b:;

   locals[23] = 1;
   locals[2] = 94;
   locals[24] = 1;
   locals[3] = 95;
   locals[25] = 1;
   locals[4] = 96;
   locals[26] = locals[1];
   locals[5] = 97;
   locals[6] = 0;
   locals[44] = babl_fmenu( 0, &locals[2], &locals[23] );
   switch ( locals[44] ) {

   case 94:

      func_0d4e();
   break;

   case 95:

      func_0d33();
   break;

   case 96:

      func_08aa();
   break;

   case 97:

   break;

   } // end switch

   say( "Some sorceress the Guardian brought in here from the capitol a while back. Not a real social type." );
   locals[1] = 0;
   goto label_0c1b;

} // end func

void func_0caf() {

   int locals[25];

   if ( private[3] ) {

      locals[1] = 99;
      print( 1, &locals[1] );
      say( "You sure of that?" );
      locals[2] = 101;
      locals[3] = 102;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         goto label_0d18;

      break;

      case 2:

      break;

      } // end switch

      say( "I thought so. I shall leave thee to reflect on thy words awhile." );
      locals[24] = 104;
      print( 1, &locals[24] );
      func_0147();
   } // end if

   label_0d18:;

   say( "Thou hast disappointed me." );
   locals[25] = 106;
   print( 1, &locals[25] );
   private[2] = 1;
   func_0156();
} // end func

void func_0d33() {

   int locals[1];

   private[2] = 0;
   say( "I shall see thee later. 'Tis a small Keep!" );
   locals[1] = 3;
   func_0136( &locals[1] );
} // end func

void func_0d4e() {

   int locals[79];

   locals[1] = 1000;
   locals[2] = 1;
   if ( find_inv( 2, &locals[2], &locals[1] ) == 0 ) {

      say( "Thou must find thyself a blade, first!" );
      locals[3] = 109;
      locals[4] = 0;
      locals[24] = babl_menu( 0, &locals[3] );
      if ( locals[24] == 1 ) {

         func_0165();
      } // end if

   } // end if

   say( "Indeed, I could use the exercise. Draw now, and thou shalt learn from thy better!" );
   label_0d9f:;

   locals[25] = 3;
   locals[26] = 9999;
   if ( x_skills( 2, &locals[26], &locals[25] ) == 30 ) {

      locals[27] = 111;
      print( 1, &locals[27] );
      say( "There is nothing more I can teach thee, thou art mighty in the way of swords." );
      func_0165();
   } // end if

   locals[28] = 3;
   locals[29] = 10001;
   if ( x_skills( 2, &locals[29], &locals[28] ) ) {

      locals[30] = 113;
      print( 1, &locals[30] );
      locals[31] = 3;
      locals[32] = 3;
      locals[33] = 9999;
      locals[34] = x_skills( 2, &locals[33], &locals[32] ) + 1;
      x_skills( 2, &locals[34], &locals[31] );
      say( "Wouldst thou go again?" );
      locals[35] = 115;
      locals[36] = 116;
      locals[37] = 0;
      locals[56] = babl_menu( 0, &locals[35] );
      switch ( locals[56] ) {

      case 1:

         goto label_0d9f;

      break;

      case 2:

         func_0d33();
      } // end if

   } else {

   break;

   } // end switch

   locals[57] = 117;
   print( 1, &locals[57] );
   say( "Right now you need combat experience, not sparring." );
   locals[58] = 119;
   locals[59] = 0;
   locals[79] = babl_menu( 0, &locals[58] );
   if ( locals[79] == 1 ) {

      func_0d33();
   } // end if

} // end func

void func_0ea6() {

   int locals[156];

   locals[1] = 0;
   say( "Ho there, friend. It seems great things are afoot in these parts!" );
   label_0eb3:;

   label_0eb3:;

   label_0eb3:;

   locals[1] = !private[8];
   locals[23] = private[9];
   locals[2] = 121;
   locals[24] = private[8];
   locals[3] = 122;
   locals[25] = private[7];
   locals[4] = 123;
   locals[26] = locals[1];
   locals[5] = 124;
   locals[27] = 1;
   locals[6] = 125;
   locals[7] = 0;
   locals[44] = babl_fmenu( 0, &locals[2], &locals[23] );
   switch ( locals[44] ) {

   case 121:

      goto label_1056;

   break;

   case 122:

   break;

   case 123:

      goto label_103c;

   break;

   case 124:

      func_0d33();
   break;

   case 125:

      func_0d4e();
   break;

   } // end switch

   private[8] = 0;
   say( "Why, look in the barracks, my friend! 'Tis crawling with soldiers newly arrived. I have heard Mors Gotha herself is here to oversee the operation." );
   locals[45] = 127;
   locals[46] = 128;
   locals[47] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

   break;

   case 2:

      goto label_1100;

   break;

   } // end switch

   say( "I know not -- the Gotha Squad has no time to drink with us lowly guardsmen. Hah! Wait'll I ask one to spar! From the equipment I've seen come in, I'd guess it's some kind of siege operation, but I've no idea where they're bound. The nomads don't build castles!" );
   locals[88] = 1;
   locals[67] = 130;
   locals[89] = 1;
   locals[68] = 131;
   locals[90] = private[7];
   locals[69] = 132;
   locals[70] = 0;
   locals[109] = babl_fmenu( 0, &locals[67], &locals[88] );
   switch ( locals[109] ) {

   case 130:

   break;

   case 131:

      func_0d4e();
   break;

   case 132:

      goto label_103c;

   break;

   } // end switch

   say( "I wish you luck, but they're a hard-headed crew -- they usually only talk to their own!" );
   locals[110] = 53;
   locals[111] = 1;
   if ( find_inv( 2, &locals[111], &locals[110] ) ) {

      say( "You might bluff'em with that ring you've got on, though -- I'd ask you where you got it, but I might not like the answer!" );
   } // end if

   locals[112] = 3;
   func_0136( &locals[112] );
   label_103c:;

   label_103c:;

   label_103c:;

   private[7] = 0;
   say( "The black-haired sorceress?" );
   if ( play_sex ) {

      say( "I heard you two were spending a lot of time together." );
   } else {

      say( "I heard a rumor you two were something of an item, but hey -- I won't pry!" );
   } // end if

   say( "I haven't seen her around for a while. She keeps to herself a lot, you know. What else is on your mind?" );
   goto label_0eb3;

   label_1056:;

   private[8] = 0;
   private[9] = 0;
   say( "Precious little -- these new soldiers are a secretive bunch. I've seen some seige equipment come in, but nobody'll answer any of my questions!" );
   locals[113] = 123;
   if ( get_quest( 1, &locals[113] ) ) {

      say( "You'd think they'd give me some respect, now that I'm Captain of the Guards!" );
   } // end if

   locals[135] = 1;
   locals[114] = 141;
   locals[136] = 1;
   locals[115] = 142;
   locals[137] = 1;
   locals[116] = 143;
   locals[138] = private[7];
   locals[117] = 144;
   locals[118] = 0;
   locals[156] = babl_fmenu( 0, &locals[114], &locals[135] );
   switch ( locals[156] ) {

   case 141:

   break;

   case 142:

      func_0d4e();
   break;

   case 143:

      func_114f();
   break;

   case 144:

      goto label_103c;

   break;

   } // end switch

   goto label_0eb3;

   label_1100:;

   say( "I don't want to start any rumors or anything, but I'd swear I saw Mors Gotha coming in incognito, carrying that spellbook she never lets out of her sight. She takes all her meals in her office, so I can't be sure. I only ever saw her once, after all!" );
   goto label_0eb3;

} // end func

void func_1108() {

   int locals[22];

   say( "I heard of thy duel with Relk, my friend -- he was never well-liked here, and was ever quick to strike the first blow. I believe thou needst not fear reprisal." );
   locals[1] = 147;
   locals[2] = 148;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "Think nothing of it! Thou hast earned me a promotion, and eased the lives of many people here!" );
} // end func

void func_114f() {

   int locals[1];

   say( "Well, I hope I shall see the later." );
   locals[1] = 3;
   func_0136( &locals[1] );
} // end func

conversation #43
string block 0x0e2a, name Ogri

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05b9();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_0380() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_043a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 2;
      locals[2] = 3;
      locals[3] = 4;
      locals[4] = 5;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_04ed();
      break;

      case 2:

         func_0547();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 6;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_04ed() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 7;
   locals[12] = 8;
   locals[13] = 9;
   locals[14] = 10;
   locals[15] = 11;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0547() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 13;
   locals[2] = 14;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 15;
   locals[24] = 16;
   locals[25] = 17;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_05b9() {

   int locals[6];

   locals[1] = 50;
   if ( get_quest( 1, &locals[1] ) ) {

      func_035a();
   } // end if

   if ( private[0] == 0 ) {

      private[3] = 1;
      private[4] = 1;
      private[2] = 1;
      say( "Stay and talk with me a moment, traveler, for I see by thy clothing thou art from a far-off land, as am I." );
      locals[2] = 1;
      locals[3] = 10001;
      if ( x_clock( 2, &locals[3], &locals[2] ) > 11 ) {

         say( "I shall be leaving soon, and will pass onward through this deserted land. Thus passes my life..." );
      } // end if

      func_0658();
   } // end if

   if ( private[0] ) {

      say( "Ah, @GS8, thou hast come to see me again!" );
      locals[4] = 1;
      locals[5] = 10001;
      if ( x_clock( 2, &locals[5], &locals[4] ) > 11 ) {

         say( "I shall be leaving soon, and will pass onward through this deserted land. Thus passes my life..." );
      } // end if

      locals[6] = 123;
      if ( get_quest( 1, &locals[6] ) ) {

         if ( private[2] ) {

            say( "I heard of thy scrap with the Captain of the Guards -- he was always quick to fight! And thou art mightier than thou dost appear." );
            private[2] = 0;
         } // end if

      } // end if

      func_0658();
   } // end if

} // end func

void func_0658() {

   int locals[43];

   locals[22] = private[3];
   locals[1] = 23;
   locals[23] = private[4];
   locals[2] = 24;
   locals[24] = 1;
   locals[3] = 25;
   locals[25] = 1;
   locals[4] = 26;
   locals[5] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 23:

      func_06ea();
   break;

   case 24:

      func_07e6();
   break;

   case 25:

      func_0946();
   break;

   case 26:

      func_0a7c();
   break;

   } // end switch

} // end func

void func_06ea() {

   int locals[24];

   private[3] = 0;
   say( "I hail from the land of Javra, though it has been years since I have seen that place. 'Tis beyond the Tuay Mountains, far from this desert place. And tell me, who art thou?" );
   locals[1] = 8;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 28;
   locals[4] = 29;
   locals[5] = 30;
   locals[6] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      func_0762();
   break;

   case 2:

      func_077c();
   break;

   case 3:

      func_076f();
   break;

   } // end switch

} // end func

void func_0762() {

   say( "Britannia? 'Tis strange, I have never heard of such a place." );
   func_0658();
} // end func

void func_076f() {

   say( "HA HA HA! Thou'rt truly the life of the party, @GS8!" );
   func_0658();
} // end func

void func_077c() {

   int locals[23];

   locals[1] = 2;
   func_0380( &locals[1] );
   say( "Ah, 'tis a hard life we lead, never staying long in one land. 'Tis fitting we meet in Killorn Keep, for our home is a moving place, never settled, always shifting over a harsh landscape." );
   locals[2] = 34;
   locals[3] = 35;
   locals[4] = 36;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_07e6();
   break;

   case 2:

      func_0946();
   break;

   case 3:

   break;

   } // end switch

   say( "Thou'rt right, I must think of my future!" );
   func_07e6();
} // end func

void func_07e6() {

   int locals[22];

   private[4] = 0;
   say( "I am bound for Mashan, to receive a shipment of Shalathian dream-spice -- wouldst thou hear of the wondrous effects of this drug?" );
   locals[1] = 39;
   locals[2] = 40;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0836();
   break;

   case 2:

   break;

   } // end switch

   say( "Thou dost misunderstand -- 'tis no mere muddling of the mind or senses!" );
   func_0836();
} // end func

void func_0836() {

   int locals[22];

   say( "'Tis said a small measure of it, prepared properly, can bring thee dreams of the other worlds that lie next to our own! Many who take the drug speak of visions of a strange and beautiful Shrine!" );
   locals[1] = 43;
   locals[2] = 44;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08fe();
   break;

   case 2:

   break;

   } // end switch

   say( "I only wish I had some to offer thee!" );
   func_0881();
} // end func

void func_0881() {

   int locals[28];

   locals[1] = 41;
   locals[2] = -1;
   locals[4] = -1;
   say( "In the meantime, may I interest you in these boots of fire resistance? Fashioned of authentic dragon skin!" );
   locals[6] = 47;
   locals[7] = 48;
   locals[8] = 0;
   locals[27] = babl_menu( 0, &locals[6] );
   switch ( locals[27] ) {

   case 1:

   break;

   case 2:

      func_0a7c();
   break;

   } // end switch

   say( "Well, it depends on what thou canst offer me." );
   set_likes_dislikes( 2, &locals[4], &locals[1] );
   locals[28] = 10;
   func_0a62( &locals[28] );
   func_043a();
   func_0147();
} // end func

void func_08fe() {

   int locals[22];

   say( "Thou'rt most likely correct. I can only hope my customers are more gullible than thyself!" );
   locals[1] = 51;
   locals[2] = 52;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0156();
   break;

   } // end switch

} // end func

void func_0946() {

   int locals[23];

   locals[1] = 2;
   func_0380( &locals[1] );
   say( "Knowest thou not where thou art? Ah, but I suppose thou didst arrive by magical means, as many do in this place. Thou'rt in Killorn Keep, a castle which wanders the Northeastern Wasteland, suspended half a league above the desert!" );
   locals[2] = 54;
   locals[3] = 55;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_09a6();
   break;

   case 2:

      func_0999();
   break;

   } // end switch

} // end func

void func_0999() {

   say( "Who can fathom the ways of the Guardian? Perhaps it is to cow the filthy desert nomads into submission." );
   func_0658();
} // end func

void func_09a6() {

   int locals[46];

   locals[1] = 57;
   print( 1, &locals[1] );
   say( "The Guardian only knows! I have traveled far, and seen much of this world, but still I am far from having an understanding of His ways. Of the Keep, I know only that there are rooms which one is forbidden to enter." );
   locals[2] = 59;
   locals[3] = 60;
   locals[4] = 61;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

      goto label_0a5a;

   break;

   } // end switch

   locals[24] = 62;
   print( 1, &locals[24] );
   say( "Please, it is best not to speak of such things!" );
   locals[25] = 64;
   locals[26] = 65;
   locals[27] = 0;
   locals[46] = babl_menu( 0, &locals[25] );
   switch ( locals[46] ) {

   case 1:

      goto label_0a5a;

   break;

   case 2:

   break;

   } // end switch

   say( "Thank you -- one never knows who might be listening in these halls! What else can we talk about?" );
   func_0658();
   label_0a5a:;

   label_0a5a:;

   say( "If you must speak to someone, you might inquire of Ogri -- he knows many hidden things... but please, what else can we speak of?" );
   func_0658();
} // end func

void func_0a62() {

   int locals[1];

   locals[1] = 8;
   babl_hack( 2, &locals[1], param1 );
} // end func

void func_0a7c() {

   say( "Then I shall speak with thee later." );
   func_0147();
} // end func

conversation #44
string block 0x0e2b, name Mystell

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_043a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_0414() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_043a() {

   int locals[52];

   locals[1] = 50;
   if ( get_quest( 1, &locals[1] ) ) {

      func_0414();
   } // end if

   if ( private[0] == 0 ) {

      private[2] = sex( 2, &locals[3], &locals[2] );
      locals[2] = 2;
      locals[3] = 3;
      private[3] = 1;
      private[4] = 1;
      private[5] = 1;
      private[8] = 1;
      private[6] = 0;
      private[7] = 0;
      locals[4] = 4;
      print( 1, &locals[4] );
      func_05ab();
   } // end if

   if ( private[7] ) {

      say( "Greetings, young @GS33. 'Tis good to see thee, and good to see the banner hanging once again in the Great Hall." );
      locals[5] = 6;
      locals[6] = 7;
      locals[7] = 8;
      locals[8] = 0;
      locals[26] = babl_menu( 0, &locals[5] );
      switch ( locals[26] ) {

      case 1:

         func_068c();
      break;

      case 2:

         func_0ab8();
      break;

      case 3:

         func_0b93();
      } // end if

   break;

   } // end switch

   if ( private[0] ) {

      locals[27] = 123;
      if ( get_quest( 1, &locals[27] ) ) {

         if ( private[8] ) {

            private[8] = 0;
            say( "So thou hast slain the mighty Relk, hast thou? Murder is a very serious thing..." );
            locals[28] = 10;
            locals[29] = 11;
            locals[30] = 12;
            locals[31] = 0;
            locals[49] = babl_menu( 0, &locals[28] );
            switch ( locals[49] ) {

            case 1:

               goto label_0571;

            break;

            case 2:

               goto label_0571;

            break;

            case 3:

            break;

            } // end switch

            say( "To kill without remorse is a terrible thing. And yet..." );
            label_0571:;

            label_0571:;

            say( "'Tis well known he was an evil man." );
         } else {

         } // end if

         locals[50] = 1;
         locals[51] = 10001;
         if ( x_clock( 2, &locals[51], &locals[50] ) >= 14 ) {

            locals[52] = 2;
            func_035a( &locals[52] );
            say( "Such a commotion! 'Tis like the ancient days of Killorn... But what was it thou wert wanting, @GS33?" );
         } else {

            say( "Ah, thou hast returned. What wouldst thou, @GS33?" );
         } // end if

      } // end if

      func_05b8();
   } // end if

} // end func

void func_05ab() {

   say( "Wouldst thou speak to me of something, @GS33?" );
   func_05b8();
} // end func

void func_05b8() {

   int locals[44];

   locals[1] = !private[3];
   locals[23] = private[3];
   locals[2] = 18;
   locals[24] = private[4];
   locals[3] = 19;
   locals[25] = private[5];
   locals[4] = 20;
   locals[26] = private[6];
   locals[5] = 21;
   locals[27] = locals[1];
   locals[6] = 22;
   locals[28] = 1;
   locals[7] = 23;
   locals[8] = 0;
   locals[44] = babl_fmenu( 0, &locals[2], &locals[23] );
   switch ( locals[44] ) {

   case 18:

      func_06a3();
   break;

   case 19:

      func_06c0();
   break;

   case 20:

      func_073e();
   break;

   case 21:

      func_0969();
   break;

   case 22:

      func_0b93();
   break;

   case 23:

      func_068c();
   break;

   } // end switch

} // end func

void func_068c() {

   if ( private[7] ) {

      say( "A very good day to thee, young @GS33!" );
   } else {

      say( "A good day to you, young @GS33." );
   } // end if

   func_0147();
} // end func

void func_06a3() {

   int locals[1];

   locals[1] = 2;
   func_035a( &locals[1] );
   say( "I am Ogri, son of Irgo, and I serve whoever holds power in Killorn Keep, as my father did, and my father's father before him, since the first day stone was laid on stone at Killorn, these centuries past." );
   private[3] = 0;
   func_05b8();
} // end func

void func_06c0() {

   int locals[43];

   say( "The venerable Lord Thibris is king here, @GS33. He is a kind man, a great warrior in his day. He was much grieved to hear that the banner had been lost." );
   private[4] = 0;
   locals[22] = 1;
   locals[1] = 28;
   locals[23] = private[3];
   locals[2] = 29;
   locals[24] = private[5];
   locals[3] = 30;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 28:

      func_0868();
   break;

   case 29:

      func_06a3();
   break;

   case 30:

      func_073e();
   break;

   } // end switch

} // end func

void func_073e() {

   int locals[22];

   say( "The keep is an old, old place, far older than most suspect. 'Twas built by my ancestors, for purposes that have been all but forgotten in time..." );
   locals[1] = 32;
   locals[2] = 33;
   locals[3] = 34;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_079d();
   break;

   case 2:

      func_0809();
   break;

   case 3:

   break;

   } // end switch

   say( "As you like, @GS33." );
   func_05b8();
} // end func

void func_079d() {

   int locals[22];

   say( "It flies because the Guardian wishes it to fly, I suppose. But it must be very heavy, and he who lifts it so very, very old, and tired..." );
   locals[1] = 37;
   locals[2] = 38;
   locals[3] = 39;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_07fc();
   break;

   case 2:

      func_0809();
   break;

   case 3:

   break;

   } // end switch

   say( "You are right, this is not thy concern." );
   func_05b8();
} // end func

void func_07fc() {

   say( "I... cannot tell thee that, young @GS33. I may not speak of that... individual.  Perhaps we should discuss something else." );
   func_05b8();
} // end func

void func_0809() {

   int locals[22];

   say( "There are some things those of my family may not speak of. Only this: the Keep was not built to keep something out, oh no. No, it keeps something in. That is all." );
   locals[1] = 43;
   locals[2] = 44;
   locals[3] = 45;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0868();
   break;

   case 2:

      func_05ab();
   break;

   case 3:

   break;

   } // end switch

   say( "As you like, @GS33." );
   func_05b8();
} // end func

void func_0868() {

   int locals[23];

   locals[1] = 2;
   func_035a( &locals[1] );
   say( "The lost banner of Killorn! In my great-great-grandfather's time, castle's Lord fell in battle against the demon Praecor Loth, and with him was lost the Keep's emblem, the blue eagle. If in thy travels thou shouldst hear word of it, 'twould give an old man some small joy to see it returned." );
   private[6] = 1;
   locals[2] = 48;
   locals[3] = 49;
   locals[4] = 50;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_095c();
   break;

   case 2:

      func_08ec();
   break;

   case 3:

      func_08d4();
   break;

   } // end switch

} // end func

void func_08d4() {

   int locals[1];

   locals[1] = 51;
   print( 1, &locals[1] );
   func_0147();
} // end func

void func_08ec() {

   int locals[22];

   say( "I am old, @GS33, and my father was old before me, and he knew this castle when it still stood in the ground. He told me of many secrets in this castle, many twistings and twinings, which might prove of interest to one such as thee." );
   locals[1] = 53;
   locals[2] = 54;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0934();
   break;

   case 2:

      func_0941();
   break;

   } // end switch

} // end func

void func_0934() {

   say( "I mean only, "one such as thyself," @GS33. I am old, but I am not blind. Excuse me, I must going." );
   func_0147();
} // end func

void func_0941() {

   int locals[1];

   say( "Oh, twinings, twistings, curlings, whirlings..." );
   locals[1] = 57;
   print( 1, &locals[1] );
   func_0147();
} // end func

void func_095c() {

   say( "It would mean much to me, @GS33. Ah, that blue, like the ocean..." );
   func_0147();
} // end func

void func_0969() {

   int locals[22];

   say( "You have? Let me see it!" );
   locals[1] = 60;
   locals[2] = 61;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_09be();
   break;

   case 2:

      func_09b1();
   break;

   } // end switch

} // end func

void func_09b1() {

   say( "Please, do, I long to see it!" );
   func_0147();
} // end func

void func_09be() {

   int locals[27];

   locals[1] = find_barter( 1, &locals[2] );
   locals[2] = 303;
   if ( locals[1] ) {

      locals[3] = 1;
      give_ptr_npc( 2, &locals[3], &locals[1] );
      locals[4] = 55;
      locals[5] = 1;
      set_quest( 2, &locals[5], &locals[4] );
      func_0a49();
   } else {

      say( "Please, show it to me!" );
      locals[6] = 64;
      locals[7] = 65;
      locals[8] = 0;
      locals[27] = babl_menu( 0, &locals[6] );
      switch ( locals[27] ) {

      case 1:

         func_09be();
      break;

      case 2:

         func_09b1();
      } // end if

   break;

   } // end switch

} // end func

void func_0a49() {

   int locals[24];

   private[6] = 0;
   say( "The Killorn Standard! Killorn's blue is home again!" );
   locals[1] = 67;
   print( 1, &locals[1] );
   locals[2] = 303;
   do_inv_delete( 1, &locals[2] );
   say( "Stranger, I am a humble servant, and possess nothing to reward thee with, save a few secrets. Wouldst thou hear a secret?" );
   locals[3] = 69;
   locals[4] = 70;
   locals[5] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      func_0ab8();
   break;

   case 2:

   break;

   } // end switch

   say( "Of more use than thou might think." );
   func_0ab8();
} // end func

void func_0ab8() {

   int locals[67];

   private[7] = 1;
   locals[1] = 2;
   func_035a( &locals[1] );
   say( "There are few who remember the Keep's true nature. At its heart, in a room where no one enters, sit two strange creatures, who, though they have no hands or arms, support the entire weight of the keep by their own will. If they were to stop, even for a moment, this entire keep would come crashing out of the sky!." );
   locals[2] = 73;
   locals[3] = 74;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      goto label_0b0d;

   break;

   case 2:

      goto label_0b4d;

   break;

   } // end switch

   label_0b0d:;

   label_0b0d:;

   say( "The room's down below the old barracks area somewhere - I no longer recall exactly where." );
   locals[24] = 76;
   locals[25] = 77;
   locals[26] = 0;
   locals[45] = babl_menu( 0, &locals[24] );
   switch ( locals[45] ) {

   case 1:

      goto label_0b4d;

   break;

   case 2:

      goto label_0b8b;

   break;

   } // end switch

   label_0b4d:;

   label_0b4d:;

   say( "The key is hidden in a barrel in one of the storerooms." );
   locals[46] = 79;
   locals[47] = 80;
   locals[48] = 0;
   locals[67] = babl_menu( 0, &locals[46] );
   switch ( locals[67] ) {

   case 1:

      goto label_0b0d;

   break;

   case 2:

   break;

   } // end switch

   label_0b8b:;

   say( "Indeed, there is none like it in the world." );
   func_0147();
} // end func

void func_0b93() {

   int locals[26];

   say( "I have learned much in my long years, young @GS33, and gladly will I teach thee!" );
   label_0b9b:;

   locals[1] = 8;
   locals[2] = 10001;
   if ( x_skills( 2, &locals[2], &locals[1] ) ) {

      locals[3] = 83;
      print( 1, &locals[3] );
      say( "Wouldst like to learn more, young @GS33?" );
      locals[4] = 85;
      locals[5] = 86;
      locals[6] = 0;
      locals[25] = babl_menu( 0, &locals[4] );
      switch ( locals[25] ) {

      case 1:

         goto label_0b9b;

      break;

      case 2:

      break;

      } // end switch

      say( "What else can I help thee with?" );
      func_05b8();
   } else {

      locals[26] = 88;
      print( 1, &locals[26] );
      say( "I see that your mind is wandering, @GS33 -- perhaps there is important business you need to attend to?" );
      func_05b8();
   } // end if

} // end func

conversation #45
string block 0x0e2c, name Altara

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_043a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_0414() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_043a() {

   int locals[187];

   private[3] = get_quest( 1, &locals[1] );
   locals[1] = 8;
   private[6] = get_quest( 1, &locals[2] );
   locals[2] = 9;
   locals[3] = 50;
   if ( get_quest( 1, &locals[3] ) ) {

      func_0414();
   } // end if

   if ( private[0] == 0 ) {

      private[9] = play_name;
      private[2] = 0;
      private[11] = 9000;
      private[16] = 1;
      private[10] = 0;
      private[7] = 0;
      private[17] = 1;
      private[8] = 0;
      private[13] = 0;
      locals[4] = 15;
      locals[5] = 9999;
      if ( x_skills( 2, &locals[5], &locals[4] ) > 5 ) {

         private[5] = 0;
      } else {

         private[5] = 2;
      } // end if

      private[4] = 0;
      private[14] = 0;
      locals[6] = 2;
      func_035a( &locals[6] );
      say( "I greet thee, Traveler, and welcome thee to Killorn Keep. I am Mystell. For reasons of security, I must now ask thee several questions. Art thou willing to answer them?" );
      locals[7] = 3;
      locals[8] = 4;
      locals[9] = 0;
      locals[28] = babl_menu( 0, &locals[7] );
      switch ( locals[28] ) {

      case 1:

         func_07d8();
      break;

      case 2:

         func_07cb();
      } // end if

   break;

   } // end switch

   locals[29] = 123;
   if ( get_quest( 1, &locals[29] ) ) {

      if ( private[16] ) {

         private[16] = 0;
         say( "The people are saying Relk's death was some sort of accident, and Thibris believes them. I cannot prosecute thee, but neither do I believe their words." );
         locals[30] = 6;
         locals[31] = 7;
         locals[32] = 8;
         locals[33] = 9;
         locals[34] = 0;
         locals[51] = babl_menu( 0, &locals[30] );
         switch ( locals[51] ) {

         case 1:

            goto label_05ae;

         break;

         case 2:

            goto label_05ae;

         break;

         case 3:

            goto label_05ae;

         break;

         case 4:

         break;

         } // end switch

         say( "Do not make bold with me, @GS40!" );
         label_05ae:;

         label_05ae:;

         label_05ae:;

         say( "Thou'rt under suspicion here. If I catch thee doing anything further, thou shalt suffer for it, mark my words!" );
         func_0156();
      } // end if

   } // end if

   locals[52] = 1;
   locals[53] = 10001;
   if ( x_clock( 2, &locals[53], &locals[52] ) >= 14 ) {

      func_0d77();
   } // end if

   if ( private[14] ) {

      say( "Just don't bother me any more! Thou hast cost me enough." );
      locals[54] = 13;
      locals[55] = 0;
      locals[75] = babl_menu( 0, &locals[54] );
      if ( locals[75] == 1 ) {

      } // end if

      func_0156();
   } // end if

   if ( private[11] != 9000 ) {

      if ( (game_days > private[11] || game_mins > private[12]) ) {

         private[14] = 1;
         say( "You bloated idiot! That dagger was just an ordinary piece of metal! I am in disgrace, my career is in the toilet! Get out of my sight!" );
         locals[76] = 15;
         locals[77] = 16;
         locals[78] = 0;
         locals[97] = babl_menu( 0, &locals[76] );
         switch ( locals[97] ) {

         case 1:

            func_0156();
         break;

         case 2:

         break;

         } // end switch

         say( "The Guardian offers no reward for failure, spy. Now begone!" );
         func_0156();
      } else {

         say( "I am still waiting for word from the Guardian! When I receive my reward, thou shalt receive thine." );
         func_0165();
      } // end if

   } // end if

   if ( private[8] ) {

      locals[98] = 15;
      if ( get_quest( 1, &locals[98] ) == 1 ) {

         private[13] = 1;
      } // end if

      locals[99] = 11;
      if ( get_quest( 1, &locals[99] ) == 1 ) {

         private[13] = 0;
      } // end if

      say( "Well, my friend, hast thou any "news" for me?" );
      locals[121] = 1;
      locals[100] = 20;
      locals[122] = private[13];
      locals[101] = 21;
      locals[123] = 1;
      locals[102] = 22;
      locals[103] = 0;
      locals[142] = babl_fmenu( 0, &locals[100], &locals[121] );
      switch ( locals[142] ) {

      case 20:

         func_0c3d();
      break;

      case 21:

      break;

      case 22:

         func_0c71();
      break;

      } // end switch

      say( "What do you have? Let me see!" );
      locals[143] = 24;
      locals[144] = 25;
      locals[145] = 0;
      locals[164] = babl_menu( 0, &locals[143] );
      switch ( locals[164] ) {

      case 1:

         func_0cc6();
      break;

      case 2:

         func_0d3a();
      } // end if

   break;

   } // end switch

   if ( private[7] ) {

      say( "Well, @GS40, hast thou reconsidered my proposition?" );
      locals[165] = 27;
      locals[166] = 28;
      locals[167] = 0;
      locals[186] = babl_menu( 0, &locals[165] );
      switch ( locals[186] ) {

      case 1:

         func_0b10();
      break;

      case 2:

         func_0afe();
      } // end if

   break;

   } // end switch

   if ( private[0] ) {

      say( "Well, @GS40, let us resume the questioning. I shall ask thee again." );
      locals[187] = private[2];
      if ( 2 == locals[187] ) {

         func_084a();
      } else {

         if ( 3 == locals[187] ) {

            func_0958();
         } else {

            if ( 4 == locals[187] ) {

               func_09f6();
            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_07cb() {

   say( "Please allow me to rephrase the question. Thou canst answer the questions, or be executed on the spot as a spy. You may as well set about answering them, and if, later, you are displeased with your decision, well, then we can see about executing you." );
   func_07d8();
} // end func

void func_07d8() {

   int locals[22];

   say( "To begin with, what is thy name?" );
   locals[1] = 32;
   locals[2] = 33;
   locals[3] = 34;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_083a();
   break;

   case 3:

      private[9] = 35;
   break;

   } // end switch

   say( "Next question." );
   func_084a();
} // end func

void func_083a() {

   say( "Ha, ha, ha! Excellent, my dear @GS40, I see thou hast a sense of humor!" );
   say( "Now, the next question." );
   func_084a();
} // end func

void func_084a() {

   int locals[44];

   private[2] = 2;
   say( "What country dost thou come from?" );
   locals[22] = 1;
   locals[1] = 40;
   locals[23] = 1;
   locals[2] = 41;
   locals[24] = 1;
   locals[3] = 42;
   locals[25] = private[3];
   locals[4] = 43;
   locals[5] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 40:

      func_0911();
   break;

   case 41:

      func_0911();
   break;

   case 42:

      func_08f4();
   break;

   case 43:

   break;

   } // end switch

   say( "Javra. I see." );
   locals[44] = 45;
   print( 1, &locals[44] );
   func_0958();
} // end func

void func_08f4() {

   int locals[1];

   private[4] = 1;
   locals[1] = 46;
   print( 1, &locals[1] );
   func_0147();
} // end func

void func_0911() {

   int locals[2];

   private[5] = private[5] + 1;
   if ( private[5] == 7 ) {

      say( "Enough. I see that thou art not willing to cooperate with me. Please allow my guards to pierce thy body with their swords." );
      locals[1] = 125;
      locals[2] = 1;
      set_quest( 2, &locals[2], &locals[1] );
      func_0110();
   } // end if

   if ( private[5] > 3 ) {

      say( "My patience is not without its limits, stranger. Thou art warned." );
      func_0156();
   } // end if

   say( "This is not an acceptable answer. I have never heard of this country, and it is certainly not on our trading route! I warn thee, do not attempt to offer me false or imaginary answers. Go and consider thy options, but do not tarry overlong." );
   func_0156();
} // end func

void func_0958() {

   int locals[43];

   private[2] = 3;
   say( "What country art thou bound for?" );
   locals[22] = 1;
   locals[1] = 51;
   locals[23] = 1;
   locals[2] = 52;
   locals[24] = 1;
   locals[3] = 53;
   locals[25] = private[3];
   locals[4] = 54;
   locals[5] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 51:

      func_0911();
   break;

   case 52:

      func_0911();
   break;

   case 53:

      func_08f4();
   break;

   case 54:

      func_09f6();
   break;

   } // end switch

   say( "I have only one further question for you, by means of which I wish to verify thy loyalty to our one, true, Guardian." );
   func_09f6();
} // end func

void func_09f6() {

   int locals[43];

   private[2] = 4;
   say( "What, then, is the seventh of the Eight Virtues?" );
   locals[22] = 1;
   locals[1] = 57;
   locals[23] = 1;
   locals[2] = 58;
   locals[24] = 1;
   locals[3] = 59;
   locals[25] = private[6];
   locals[4] = 60;
   locals[5] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 57:

      func_0a8f();
   break;

   case 58:

      func_0a9c();
   break;

   case 59:

      func_0aa9();
   break;

   case 60:

      func_0ab6();
   break;

   } // end switch

} // end func

void func_0a8f() {

   say( "Spirituality? What art thou thinking? People cannot work when their minds are full of otherworldly nonsense! Go now, and return when thou hast learned more of the way of the Guardian." );
   func_0147();
} // end func

void func_0a9c() {

   say( "Do not take too long." );
   func_0147();
} // end func

void func_0aa9() {

   say( "Honour? 'Tis but another name for the prideful squabbling of school children! Clearly thou knowest not the meaning of virtue. Go, and learn of it." );
   func_0147();
} // end func

void func_0ab6() {

   int locals[22];

   say( "Excellent! I see that thou hast studied well the way of our master. Now that I have ascertained thy loyalty, I have a proposition to make to you. I have need of one who is a stranger to the keep, one who I can trust with some private information. Wilt thou hear of it?" );
   locals[1] = 65;
   locals[2] = 66;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b10();
   break;

   case 2:

      func_0afe();
   break;

   } // end switch

} // end func

void func_0afe() {

   say( "Well, so be it. Return if thou dost change thy mind." );
   private[7] = 1;
   func_0147();
} // end func

void func_0b10() {

   int locals[24];

   say( "It is a delicate matter. I would like you to speak with a resident of the Keep, the sorceress Altara, and sound her out on certain topics -- I have reason to suspect she is an enemy of our Guardian. If thou canst find proof, I shall give thee thirty gold pieces." );
   locals[1] = 13;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 69;
   locals[4] = 70;
   locals[5] = 71;
   locals[6] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      func_0bcb();
   break;

   case 2:

      func_0b83();
   break;

   case 3:

      func_0bcb();
   break;

   } // end switch

} // end func

void func_0b83() {

   int locals[22];

   say( "Service to the Guardian is ALWAYS virtuous. Now come, what sayest thou?" );
   locals[1] = 73;
   locals[2] = 74;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0bcb();
   break;

   case 2:

      func_0afe();
   break;

   } // end switch

} // end func

void func_0bcb() {

   int locals[23];

   locals[1] = 2;
   func_035a( &locals[1] );
   say( "Altara once seemed destined for the Guardian's High Council -- why has she come to a backwater like Killorn? Her reasons for being here don't add up at all! If I could uncover proof of her treachery, I might receive a promotion, perhaps even a position in the capitol! Wilt thou do this for me?" );
   locals[2] = 76;
   locals[3] = 77;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0c26();
   break;

   case 2:

   break;

   } // end switch

   private[7] = 1;
   say( "I understand thy decision. Enjoy thy stay in the Keep." );
   func_0147();
} // end func

void func_0c26() {

   say( "Money will come with proof, @GS40. Now go, it is not well we should be seen together." );
   private[7] = 0;
   private[8] = 1;
   func_0147();
} // end func

void func_0c3d() {

   int locals[22];

   say( "Keep trying, @GS40! If she can be made to trust you, I'm sure you will be able to obtain some proof. Remember, the Guardian is depending on you." );
   locals[1] = 81;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0147();
   } // end if

} // end func

void func_0c71() {

   int locals[22];

   say( "I knew that, @GS40, that's not the point. We need proof of her vile revolutionary activities, or we cannot act. Go back and finish what you started, Avatar. And be quick about!" );
   locals[1] = 83;
   locals[2] = 84;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0cb9();
   break;

   } // end switch

} // end func

void func_0cb9() {

   say( "But thou likest the reward, dost thou not? Thirty in gold? Now go!" );
   func_0156();
} // end func

void func_0cc6() {

   int locals[26];

   locals[1] = find_barter( 1, &locals[3] );
   locals[3] = 10;
   if ( locals[1] ) {

      locals[4] = 1;
      give_ptr_npc( 2, &locals[4], &locals[1] );
      func_0d47();
   } else {

      say( "Well? Hand it over!" );
      locals[5] = 87;
      locals[6] = 88;
      locals[7] = 0;
      locals[26] = babl_menu( 0, &locals[5] );
      switch ( locals[26] ) {

      case 1:

         func_0cc6();
      break;

      case 2:

         func_0d3a();
      } // end if

   break;

   } // end switch

} // end func

void func_0d3a() {

   say( "Well, run and fetch it, idiot!" );
   func_0156();
} // end func

void func_0d47() {

   int locals[2];

   locals[1] = 16;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   say( "I shall relay this directly to the Guardian! Thou hast done well, my servant!" );
   private[11] = game_days;
   private[12] = game_mins;
   func_0147();
} // end func

void func_0d77() {

   int locals[90];

   if ( private[17] ) {

      private[17] = 0;
      say( "This invasion is a disaster!" );
      locals[1] = 92;
      locals[2] = 93;
      locals[3] = 94;
      locals[4] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         goto label_0e19;

      break;

      case 2:

         goto label_0e1c;

      break;

      case 3:

      break;

      } // end switch

      say( "For me, of course! That Gotha woman walked in and took over the whole keep, just like that! The nerve!" );
      locals[23] = 96;
      locals[24] = 97;
      locals[25] = 0;
      locals[44] = babl_menu( 0, &locals[23] );
      switch ( locals[44] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      label_0e14:;

      say( "Titan's Teeth! You're not supposed to know anything about this. Look, don't tell anyone anything, all right? I must go salvage my career!" );
      func_0156();
      label_0e19:;

      say( "The top secret invasion, of course!" );
      label_0e1c:;

      label_0e1c:;

      say( "Mors Gotha's taken over the entire Keep. I'm powerless again. It's as if the Guardian never intended to promote me out of this backwater at all!" );
      locals[45] = 101;
      locals[46] = 102;
      locals[47] = 103;
      locals[48] = 0;
      locals[66] = babl_menu( 0, &locals[45] );
      switch ( locals[66] ) {

      case 1:

      break;

      case 2:

         goto label_0e73;

      break;

      case 3:

         goto label_0e86;

      break;

      } // end switch

      say( "Fah! Much help thou art! Now excuse me, I must go salvage my career!" );
      func_0156();
      label_0e73:;

      say( "Nay, the Guardian knows merit when he sees it. Someday he shall recognize my worth. 'Tis but another test, just another test..." );
      locals[67] = 106;
      print( 1, &locals[67] );
      func_0156();
      label_0e86:;

      say( "Yes, thou'rt right, @GS40. I must merely wait out this madwoman's stay a bit longer. I swear, if she requisitions any more sticks of meat..." );
      locals[68] = 108;
      print( 1, &locals[68] );
      func_0156();
   } else {

      say( "Will Mors Gotha and her siege army never leave!?" );
      locals[69] = 110;
      locals[70] = 111;
      locals[71] = 112;
      locals[72] = 0;
      locals[90] = babl_menu( 0, &locals[69] );
      switch ( locals[90] ) {

      case 1:

         goto label_0e14;

      break;

      case 2:

         goto label_0e1c;

      break;

      case 3:

      break;

      } // end switch

      say( "Thank thee. I appreciate it." );
      func_0156();
   } // end if

} // end func

conversation #46
string block 0x0e2d, name Jerry the Rat

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05b9();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_04ff() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_05b9() {

   int locals[265];

   locals[1] = get_quest( 1, &locals[2] );
   locals[2] = 58;
   if ( !locals[1] ) {

      locals[1] = get_quest( 1, &locals[3] );
      locals[3] = 125;
   } // end if

   private[5] = sex( 2, &locals[5], &locals[4] );
   locals[4] = 18;
   locals[5] = 19;
   private[6] = get_quest( 1, &locals[6] );
   locals[6] = 13;
   locals[7] = 50;
   if ( get_quest( 1, &locals[7] ) ) {

      func_04d9();
   } // end if

   locals[8] = 279;
   locals[9] = 1;
   find_inv( 2, &locals[9], &locals[8] ) && find_inv( 2, &locals[11], &locals[10] );  // expr. has value on stack!
   locals[10] = 275;
   if ( locals[11] = 1 ) {

      locals[12] = 168;
      locals[13] = 1;
      if ( find_inv( 2, &locals[13], &locals[12] ) && private[14] ) {

         locals[14] = 12;
         locals[15] = 1;
         set_quest( 2, &locals[15], &locals[14] );
      } // end if

   } // end if

   if ( private[0] == 0 ) {

      private[8] = 1;
      private[3] = 0;
      private[13] = 0;
      private[2] = 1;
      private[11] = 1;
      private[7] = 1;
      private[14] = 0;
      private[4] = 0;
      private[12] = 0;
      private[9] = 0;
      private[10] = 1;
      locals[16] = 20;
      print( 1, &locals[16] );
      say( "Hello there." );
      locals[17] = 22;
      locals[18] = 23;
      locals[19] = 24;
      locals[20] = 25;
      locals[21] = 0;
      locals[38] = babl_menu( 0, &locals[17] );
      switch ( locals[38] ) {

      case 1:

         func_0abf();
      break;

      case 2:

         private[4] = 1;
         func_1290();
      break;

      case 3:

         func_0de2();
      break;

      case 4:

      break;

      } // end switch

      locals[39] = 15;
      locals[40] = 9999;
      if ( x_skills( 2, &locals[40], &locals[39] ) > 9 ) {

         func_0c42();
      } else {

         func_0abf();
      } // end if

   } // end if

   if ( private[9] ) {

      say( "What do you want?" );
      locals[41] = 27;
      locals[42] = 28;
      locals[43] = 0;
      locals[62] = babl_menu( 0, &locals[41] );
      switch ( locals[62] ) {

      case 1:

      break;

      case 2:

         func_1c14();
      break;

      } // end switch

      say( "I don't talk to traitors, @GS8. If you really hate the Guardian, come here carrying Relk's head, or not at all." );
      locals[63] = 30;
      locals[64] = 31;
      locals[65] = 32;
      locals[66] = 34;
      locals[67] = 0;
      locals[84] = babl_menu( 0, &locals[63] );
      switch ( locals[84] ) {

      case 1:

      break;

      case 2:

         func_1e2b();
      break;

      case 3:

         say( "Of course not -- you belong to the Guardian, don't you?" );
         func_0156();
      break;

      case 4:

         func_1c14();
      } // end if

   break;

   } // end switch

   locals[85] = 16;
   if ( get_quest( 1, &locals[85] ) ) {

      if ( private[13] ) {

      } else {

         locals[86] = 123;
         if ( get_quest( 1, &locals[86] ) ) {

            private[13] = 1;
            say( "You ran straight to Mystell with that dagger, didn't you? If thou hadst not slain Relk, I would think thou wert a spy for Guardian himself! Come, what hast thou to say for thyself?" );
            locals[87] = 36;
            locals[88] = 37;
            locals[89] = 0;
            locals[108] = babl_menu( 0, &locals[87] );
            switch ( locals[108] ) {

            case 1:

            break;

            case 2:

               goto label_0888;

            break;

            } // end switch

            say( "Indeed, this may cost me greatly." );
            goto label_088b;

            label_0888:;

            say( "Aye, for the Guardian, perhaps!" );
            label_088b:;

            say( "As thou art my only ally, I shall give thee another chance! I have fashioned another dagger. Take it, and do not fail me again!" );
            locals[109] = 10;
            do_inv_create( 1, &locals[109] );
            locals[110] = 10;
            take_from_npc( 1, &locals[110] );
            locals[111] = 41;
            locals[112] = 0;
            locals[132] = babl_menu( 0, &locals[111] );
            if ( locals[132] == 1 ) {

            } // end if

            func_0156();
         } // end if

         say( "You ran straight to Mystell with that dagger, didn't you? It will do them little good, but now at least I know thou canst not be trusted." );
         locals[133] = 43;
         locals[134] = 44;
         locals[135] = 45;
         locals[136] = 0;
         locals[154] = babl_menu( 0, &locals[133] );
         switch ( locals[154] ) {

         case 1:

         break;

         case 2:

         break;

         case 3:

         break;

         } // end switch

         say( "I had hoped to find an ally, in this fight, @GS8, but it is not to be thee. Please get out of my sight." );
         locals[155] = 47;
         locals[156] = 0;
         locals[176] = babl_menu( 0, &locals[155] );
         if ( locals[176] == 1 ) {

            func_1b7b();
         } // end if

      } // end if

      if ( private[4] ) {

         say( "May I help thee, stranger?" );
         locals[198] = 1;
         locals[177] = 49;
         locals[199] = private[6];
         locals[178] = 50;
         locals[200] = 1;
         locals[179] = 51;
         locals[201] = locals[1];
         locals[180] = 52;
         locals[181] = 0;
         locals[219] = babl_fmenu( 0, &locals[177], &locals[198] );
         switch ( locals[219] ) {

         case 49:

            func_0c42();
         break;

         case 50:

            func_0b9e();
         break;

         case 51:

         break;

         case 52:

            func_0b6d();
         break;

         } // end switch

         say( "I am afraid I have no time to take on an apprentice, currently. Perhaps you could try again in a year or two." );
         func_1290();
      } // end if

      locals[220] = 16;
      get_quest( 1, &locals[220] ) == 0 && get_quest( 1, &locals[221] );  // expr. has value on stack!
      if ( locals[221] = 123 ) {

         if ( private[8] ) {

            private[8] = 0;
            say( "Thou hast done a very dangerous thing, Avatar! Relk was not well-liked here, but he was a favorite of the Guardian's, and his death shall not go unnoticed." );
            locals[222] = 55;
            locals[223] = 56;
            locals[224] = 57;
            locals[225] = 0;
            locals[243] = babl_menu( 0, &locals[222] );
            switch ( locals[243] ) {

            case 1:

            break;

            case 2:

            break;

            case 3:

               goto label_0aa8;

            break;

            } // end switch

            say( "Then we are doubly in peril! Remember, my life is at stake as well as thine, @GS8!" );
            locals[244] = 59;
            locals[245] = 60;
            locals[246] = 0;
            locals[265] = babl_menu( 0, &locals[244] );
            switch ( locals[265] ) {

            case 1:

            break;

            case 2:

               goto label_0aa3;

            break;

            } // end switch

            say( "Aye, please do so -- thou canst not merely slay where thou dost like! But come, what brings thee here, today?" );
            func_108c();
            label_0aa3:;

            say( "Nay, Avatar, I shall not abandon my world so easily! I will stay and die, rather than leave the Guardian to rule here, and that is final. But come, we have work to do!" );
            func_108c();
            label_0aa8:;

            say( "No tales? Who told thee such nonsense? Come, do not waste my time, but tell me what brings thee here today." );
            func_108c();
         } // end if

      } // end if

   } // end if

   if ( private[0] ) {

      private[4] = 0;
      say( "How may I help thee, Avatar?" );
      func_108c();
   } // end if

} // end func

void func_0abf() {

   int locals[47];

   locals[1] = get_quest( 1, &locals[2] );
   locals[2] = 58;
   if ( !locals[1] ) {

      locals[1] = get_quest( 1, &locals[3] );
      locals[3] = 125;
   } // end if

   locals[4] = 2;
   func_04ff( &locals[4] );
   say( "I am Altara, sorceress resident of Killorn Keep." );
   locals[26] = 1;
   locals[5] = 66;
   locals[27] = locals[1];
   locals[6] = 67;
   locals[28] = private[6];
   locals[7] = 68;
   locals[8] = 0;
   locals[47] = babl_fmenu( 0, &locals[5], &locals[26] );
   switch ( locals[47] ) {

   case 66:

      func_0c42();
   break;

   case 67:

      func_0b6d();
   break;

   case 68:

      func_0b9e();
   break;

   } // end switch

} // end func

void func_0b6d() {

   int locals[2];

   locals[1] = babl_ask( 0 );
   say( "\1@SS1\0" );
   locals[2] = 70;
   if ( contains( 2, &locals[1], &locals[2] ) ) {

      func_0e89();
   } else {

      say( "Er...yes." );
      func_0d80();
   } // end if

} // end func

void func_0b9e() {

   int locals[22];

   say( "I see. And art thou a friend of hers?" );
   locals[1] = 73;
   locals[2] = 74;
   locals[3] = 75;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0d80();
   break;

   case 2:

      func_0bfa();
   break;

   case 3:

      func_0bfa();
   break;

   } // end switch

} // end func

void func_0bfa() {

   int locals[22];

   say( "Thou'rt a good judge of character, @GS8, for I am well aware that she doth enjoy spying on me, and on poor drunken Lobar, too. Now what may I do for thee?" );
   locals[1] = 77;
   locals[2] = 78;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0e89();
   break;

   case 2:

      func_0df4();
   break;

   } // end switch

} // end func

void func_0c42() {

   int locals[90];

   locals[1] = 15;
   locals[2] = 9999;
   if ( x_skills( 2, &locals[2], &locals[1] ) > 10 ) {

      private[6] = 1;
   } // end if

   locals[3] = 79;
   print( 1, &locals[3] );
   locals[4] = 2;
   func_04ff( &locals[4] );
   say( "I... see. I am Altara, sorceress of Killorn Keep. Thou'rt some sort... of foreign dignitary?" );
   locals[26] = 1;
   locals[5] = 81;
   locals[27] = private[6];
   locals[6] = 82;
   locals[28] = private[6];
   locals[7] = 83;
   locals[29] = 1;
   locals[8] = 84;
   locals[9] = 0;
   locals[47] = babl_fmenu( 0, &locals[5], &locals[26] );
   switch ( locals[47] ) {

   case 81:

      func_0d80();
   break;

   case 82:

      func_0df4();
   break;

   case 83:

      func_0e89();
   break;

   case 84:

   break;

   } // end switch

   say( "Don't we all? We are all the Guardian's devoted servants, are we not?" );
   locals[69] = 1;
   locals[48] = 86;
   locals[70] = 1;
   locals[49] = 87;
   locals[71] = private[6];
   locals[50] = 88;
   locals[51] = 0;
   locals[90] = babl_fmenu( 0, &locals[48], &locals[69] );
   switch ( locals[90] ) {

   case 86:

      func_0d80();
   break;

   case 87:

      func_0d80();
   break;

   case 88:

      func_0e89();
   break;

   } // end switch

} // end func

void func_0d80() {

   int locals[22];

   private[4] = 1;
   say( "And may I ask what business thou hast coming here?" );
   locals[1] = 90;
   locals[2] = 91;
   locals[3] = 92;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

      func_0de2();
   break;

   } // end switch

   say( "I'm afraid I am too busy." );
   func_1290();
} // end func

void func_0de2() {

   private[4] = 1;
   say( "I'm afraid I have no time for questions. If you need some information, I'm sure Mystell would be happy to help thee." );
   func_1290();
} // end func

void func_0df4() {

   int locals[23];

   private[4] = 0;
   say( "Another..." );
   locals[1] = 96;
   print( 1, &locals[1] );
   say( "'Tis true! Why have you come here, stranger?" );
   locals[2] = 98;
   locals[3] = 99;
   locals[4] = 100;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0e89();
   break;

   case 2:

      func_0e66();
   break;

   case 3:

      func_0e89();
   break;

   } // end switch

} // end func

void func_0e66() {

   int locals[1];

   private[4] = 1;
   say( "'Twas no accident, stranger! Thinkest thou I am a fool?" );
   locals[1] = 102;
   print( 1, &locals[1] );
   say( "Well, I have no time to waste on "accidents!"" );
   func_1290();
} // end func

void func_0e89() {

   int locals[52];

   private[4] = 0;
   locals[2] = get_quest( 1, &locals[3] );
   locals[3] = 49;
   locals[1] = 0;
   locals[4] = 4;
   if ( get_quest( 1, &locals[4] ) ) {

      locals[1] = 1;
   } // end if

   locals[5] = 2;
   if ( get_quest( 1, &locals[5] ) ) {

      locals[1] = 1;
   } // end if

   say( "Hush! Mystell is ever spying upon me -- doubtless, she approached thee on the subject, too!" );
   locals[6] = 105;
   print( 1, &locals[6] );
   locals[7] = 21;
   locals[8] = 48;
   locals[9] = 1;
   gronk_door( 3, &locals[9], &locals[8], &locals[7] );
   if ( locals[2] ) {

      if ( locals[1] ) {

         say( "Before his death, Bishop told me you might come." );
      } else {

         say( "Bishop told me you might come." );
      } // end if

   } // end if

   locals[31] = 1;
   locals[10] = 108;
   locals[32] = locals[2];
   locals[11] = 110;
   locals[33] = 1;
   locals[12] = 112;
   locals[13] = 0;
   locals[52] = babl_fmenu( 0, &locals[10], &locals[31] );
   switch ( locals[52] ) {

   case 108:

      say( "No, I will not call the guards." );
      func_0f92();
   break;

   case 110:

      say( "You might say, we are in a similar line of work." );
      func_0f92();
   break;

   case 112:

   break;

   } // end switch

   say( "However I can." );
   func_0f92();
} // end func

void func_0f92() {

   int locals[24];

   locals[1] = 50;
   x_exp( 1, &locals[1] );
   say( "I am no friend to the Guardian, either. I once sought to organize an independent political movement, a group that would promote causes not specifically authorized by the High Council." );
   locals[2] = 115;
   locals[3] = 116;
   locals[4] = 117;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

   break;

   case 2:

      func_100d();
   break;

   case 3:

      func_100d();
   break;

   } // end switch

   locals[24] = 118;
   print( 1, &locals[24] );
   say( "I admit it." );
   func_100d();
} // end func

void func_100d() {

   int locals[23];

   say( "The Council's policy debates are a sham, @GS8. The Guardian brooks no dissent among his subjects. We were betrayed, and those of us too valuable to kill were exiled to the four corners of the empire. Thus I was posted to this desert keep, ever observed by Mystell and her craven ilk." );
   locals[1] = 121;
   locals[2] = 122;
   locals[3] = 123;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_1067;

   break;

   case 3:

      func_107a();
   break;

   } // end switch

   say( "Perhaps. But first, I would learn of thine own quarrel with the Titan." );
   label_1067:;

   locals[23] = 125;
   print( 1, &locals[23] );
   func_1426();
} // end func

void func_107a() {

   private[4] = 0;
   say( "I am a sorceress of some small ability. The Guardian values my research on extraplanar phenomena." );
   func_108c();
} // end func

void func_108c() {

   int locals[25];

   private[4] = 0;
   locals[1] = 127;
   locals[2] = 11;
   if ( get_quest( 1, &locals[2] ) ) {

      locals[1] = 128;
   } // end if

   if ( private[11] == 0 ) {

      locals[1] = 129;
   } // end if

   locals[3] = 12;
   if ( get_quest( 1, &locals[3] ) ) {

      locals[1] = 130;
   } // end if

   if ( private[10] == 0 ) {

      locals[1] = 131;
   } // end if

   locals[4] = 132;
   locals[5] = 133;
   locals[6] = 134;
   locals[7] = 135;
   locals[8] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

      func_1149();
   break;

   case 2:

      func_12ab();
   break;

   case 3:

      func_13bf();
   break;

   case 4:

      func_1290();
   break;

   } // end switch

} // end func

void func_1149() {

   say( "Transactions among the many worlds are more common than thou might think. All sorts of things -- teleport storms, major acts of magic, special plants and animals -- can bridge the gaps between realities." );
   func_1156();
} // end func

void func_1156() {

   int locals[22];

   locals[1] = 137;
   locals[2] = 138;
   locals[3] = 139;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_11af();
   break;

   case 2:

      func_11fa();
   break;

   case 3:

      func_1245();
   break;

   } // end switch

} // end func

void func_11af() {

   int locals[22];

   say( "It is not known. Some sort of transitory localized disturbance, maybe a bit like turbulence in water. It moves objects and people arbitrary distances, both between and within worlds." );
   locals[1] = 141;
   locals[2] = 142;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_108c();
   break;

   } // end switch

   say( "What wouldst thou hear of now?" );
   func_1156();
} // end func

void func_11fa() {

   int locals[22];

   say( "There is a kind of resonance between planes which lie close to one another. Powerful and violent magics, such as the Guardian is so fond of, cause gateways to open between realities, where the same magic repeats itself more faintly, like an echo." );
   locals[1] = 145;
   locals[2] = 146;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_108c();
   break;

   } // end switch

   say( "What wouldst thou hear of now?" );
   func_1156();
} // end func

void func_1245() {

   int locals[22];

   say( "In this matter I know only rumors. Certain plants are mentioned in ancient texts, which when eaten cast one into other worlds, in one's dreams. They speak of some kind of "Spiritual Shrine" associated with this phenomenon . . . but my recollection of the work is hazy." );
   locals[1] = 149;
   locals[2] = 150;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_108c();
   break;

   } // end switch

   say( "What wouldst thou hear of now?" );
   func_1156();
} // end func

void func_1290() {

   int locals[1];

   say( "Goodbye." );
   locals[1] = 153;
   print( 1, &locals[1] );
   func_0165();
} // end func

void func_12ab() {

   int locals[52];

   label_12b0:;

   say( "Of course, @GS8. Wouldst thou improve thy casting skill, or learn to increase thy store of mana?" );
   locals[1] = 155;
   locals[2] = 156;
   locals[3] = 157;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_1304;

   break;

   case 2:

      goto label_1341;

   break;

   case 3:

      func_1290();
   break;

   } // end switch

   label_1304:;

   say( "Certainly." );
   locals[23] = 9;
   locals[24] = 10001;
   if ( x_skills( 2, &locals[24], &locals[23] ) ) {

      locals[25] = 159;
      print( 1, &locals[25] );
   } else {

      locals[26] = 160;
      print( 1, &locals[26] );
   } // end if

   goto label_137c;

   label_1341:;

   say( "I will help thee." );
   locals[27] = 7;
   locals[28] = 10001;
   if ( x_skills( 2, &locals[28], &locals[27] ) ) {

      locals[29] = 162;
      print( 1, &locals[29] );
   } else {

      locals[30] = 163;
      print( 1, &locals[30] );
   } // end if

   label_137c:;

   say( "Shall I teach thee more?" );
   locals[31] = 165;
   locals[32] = 166;
   locals[33] = 0;
   locals[52] = babl_menu( 0, &locals[31] );
   switch ( locals[52] ) {

   case 1:

      goto label_12b0;

   break;

   case 2:

      func_1290();
   break;

   } // end switch

} // end func

void func_13bf() {

   int locals[4];

   locals[1] = 16;
   if ( get_quest( 1, &locals[1] ) ) {

      private[2] = 0;
   } // end if

   locals[2] = 14;
   if ( get_quest( 1, &locals[2] ) ) {

      func_1ac8();
   } // end if

   locals[3] = 12;
   if ( get_quest( 1, &locals[3] ) ) {

      func_16fe();
   } // end if

   locals[4] = 11;
   if ( get_quest( 1, &locals[4] ) ) {

      if ( private[2] ) {

         private[2] = 0;
         func_15d2();
      } else {

         func_162b();
      } // end if

   } // end if

   func_1426();
} // end func

void func_1426() {

   int locals[51];

   private[3] = 1;
   if ( private[7] ) {

      locals[2] = 167;
      print( 1, &locals[2] );
      say( "You understand, 'tis a great risk for one in my position to trust thee with this. Listen well -- I was a long while in the Guardian's service, and I know his methods. There will be an observer in thy castle, some magical creature lurking in the sewers and tunnels there." );
      locals[3] = 169;
      locals[4] = 170;
      locals[5] = 0;
      locals[24] = babl_menu( 0, &locals[3] );
      switch ( locals[24] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      say( "By now it has burrowed deep into the rock foundation of thy fortress, its ear to the stone, listening to all that transpires there. It will stay near a body of water, and surround itself with walls of fire." );
      locals[25] = 172;
      locals[26] = 173;
      locals[27] = 0;
      locals[46] = babl_menu( 0, &locals[25] );
      switch ( locals[46] ) {

      case 1:

      break;

      case 2:

         func_153a();
      break;

      } // end switch

      locals[1] = take_from_npc( 1, &locals[47] );
      locals[47] = 10;
      say( "Keep this dagger with thee! This shall bring thee through any fire-walls it puts in thy path. And though other weapons may wound it, only this blade can deal the killing blow." );
      switch ( locals[1] ) {

      case 1:

         private[7] = 0;
         locals[48] = 15;
         locals[49] = 1;
         set_quest( 2, &locals[49], &locals[48] );
         func_1585();
      break;

      case 2:

         say( "I see thou'rt heavily encumbered I will leave it for thee here." );
         locals[50] = 15;
         locals[51] = 1;
         set_quest( 2, &locals[51], &locals[50] );
         private[7] = 0;
         func_1585();
      break;

      case 3:

         say( "Perhaps thou shouldst come back for it later." );
         func_0147();
      break;

      func_0147();
   } else {

      say( "Please, find and destroy the listener-imp lurking beneath thy fortress -- I can sense that he is still in place, within his icy burrow. Remember, only this dagger can gain you entrance to his lair and kill him!" );
      func_108c();
   } // end if

} // end func

void func_153a() {

   int locals[22];

   say( "@GS8, thou hast come to me as a friend and ally, and I have trusted thee thus far. Wilt thou do this for me, and for thyself?" );
   locals[1] = 179;
   locals[2] = 180;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   locals[22] == 1;  // expr. has value on stack!
   func_1ebe();
   } // end switch

   if ( locals[22] == 2 ) {

   } // end if

   say( "Mark me, if thou wilt not work with me in this matter, both of us shall fail in our ambition. Return if thou dost change thy mind." );
   func_0156();
} // end func

void func_1585() {

   int locals[24];

   locals[1] = 182;
   print( 1, &locals[1] );
   say( "Thank thee, @GS8. We shall make a good team in this." );
   locals[2] = 184;
   locals[3] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   if ( locals[23] == 1 ) {

      func_0165();
   } // end if

   locals[24] = 3;
   func_0136( &locals[24] );
} // end func

void func_15d2() {

   int locals[23];

   locals[1] = 110;
   x_exp( 1, &locals[1] );
   say( "So thou hast disposed of the Guardian's watcher? Then thou art trustworthy after all! 'Tis well, as I have need of an ally who can travel the planes." );
   locals[2] = 186;
   locals[3] = 187;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_162b();
   break;

   case 2:

   break;

   } // end switch

   say( "Past experience has shown me that few people, if any, are trustworthy. My previous naivete proved most... expensive." );
   func_162b();
} // end func

void func_162b() {

   int locals[28];

   if ( private[11] ) {

      locals[2] = 189;
      print( 1, &locals[2] );
      say( "I have almost succeeded in placing a powerful enchantment in this pearl. It lacks only two rare elements, the egg of a dread spider, and an amethyst rod. Once complete, it will become a powerful weapon in this fight." );
      private[14] = 1;
      locals[3] = 191;
      locals[4] = 192;
      locals[5] = 0;
      locals[24] = babl_menu( 0, &locals[3] );
      switch ( locals[24] ) {

      case 1:

      break;

      case 2:

         func_1f52();
      break;

      } // end switch

      say( "Here, take the pearl with thee, and bring it back with the components." );
      locals[1] = take_from_npc( 1, &locals[25] );
      locals[25] = 168;
      switch ( locals[1] ) {

      case 1:

         private[11] = 0;
      break;

      case 2:

         say( "Hm. I see thou'rt heavily encumbered. I will leave it for thee here." );
         private[11] = 0;
      break;

      case 3:

         say( "Perhaps thou shouldst come back for it later." );
      } else {

      break;

      say( "You must assemble all parts of the sceptre before we can continue." );
      func_108c();
   } // end if

   locals[26] = 143;
   locals[27] = 1;
   find_inv( 2, &locals[27], &locals[26] );  // expr. has value on stack!
   say( "Before you go -- I have noticed that thou dost practice runic magic. Wilt thou take these with thee, @GS8, as my gift?" );
   func_1e36();
   } // end switch

   say( "May good fortune go with thee!" );
   locals[28] = 3;
   func_0136( &locals[28] );
} // end func

void func_16fe() {

   int locals[129];

   if ( private[10] ) {

      say( "Excellent! And now, if thou wouldst hand them to me . . ." );
      locals[2] = 200;
      print( 1, &locals[2] );
      func_195f();
      private[10] = 0;
      say( "Thank thee." );
      locals[3] = 202;
      print( 1, &locals[3] );
      locals[1] = do_inv_create( 1, &locals[4] );
      locals[4] = 274;
      locals[5] = 279;
      do_inv_delete( 1, &locals[5] );
      locals[6] = 275;
      do_inv_delete( 1, &locals[6] );
      locals[7] = 168;
      do_inv_delete( 1, &locals[7] );
      locals[8] = 1;
      locals[9] = 7;
      locals[10] = 65535;
      locals[11] = 12;
      locals[12] = 512 + 64;
      locals[13] = 65535;
      locals[14] = 65535;
      locals[15] = 65535;
      x_obj_stuff( 9, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[10], &locals[9], &locals[8], &locals[1] );
      locals[16] = 274;
      take_from_npc( 1, &locals[16] );
      locals[17] = 150;
      x_exp( 1, &locals[17] );
      say( "Now, listen carefully. I have sensed that the Guardian has cast a powerful spell over your world. Is this not the case?" );
      locals[18] = 204;
      locals[19] = 0;
      locals[39] = babl_menu( 0, &locals[18] );
      if ( locals[39] == 1 ) {

      } // end if

      say( "When the Guardian cast his spell, he opened cracks between the worlds, cracks that led to the sites of similar spells on other worlds -- these are his places of power. His lines of energy are strung thus in a web throughout the multiverse. This staff can cut those lines." );
      locals[40] = 206;
      locals[41] = 207;
      locals[42] = 0;
      locals[61] = babl_menu( 0, &locals[40] );
      switch ( locals[61] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      say( "On each world, you must find his place of power, some vile sorcerous engine or a ruin blighted by his magic, and touch the staff to the earth. It cannot cancel his magic, but it can prevent him from drawing energy from a plane, and using that energy to power his spell." );
      locals[62] = 209;
      locals[63] = 210;
      locals[64] = 211;
      locals[65] = 0;
      locals[83] = babl_menu( 0, &locals[62] );
      switch ( locals[83] ) {

      case 1:

      break;

      case 2:

         func_1a24();
      break;

      case 3:

         func_1a6f();
      break;

      } // end switch

      say( "Excellent! At last, I have an ally of courage!" );
      func_0165();
   } else {

      private[12] == 0 && x_clock( 2, &locals[85], &locals[84] ) > 9;  // expr. has value on stack!
      locals[84] = 1;
      if ( locals[85] = 10001 ) {

         private[12] = 1;
         say( "'Tis good that thou asked, @GS8! I have recently perfected a new spell, which I call "Enchantment." It will recharge a magical artifact's energies, or lend magical potency to any weapon or armor!" );
         locals[86] = 214;
         locals[87] = 215;
         locals[88] = 0;
         locals[107] = babl_menu( 0, &locals[86] );
         switch ( locals[107] ) {

         case 1:

            goto label_1905;

         break;

         case 2:

         break;

         } // end switch

         say( "Aye -- none but the greatest mages may cast it!" );
         label_1905:;

         say( "Its runes are VAS ORT YLEM -- may it serve thee well!" );
         func_108c();
      } // end if

      if ( private[12] ) {

         say( "Has VAS ORT YLEM been of use to thee?" );
         locals[108] = 219;
         locals[109] = 220;
         locals[110] = 0;
         locals[129] = babl_menu( 0, &locals[108] );
         switch ( locals[129] ) {

         case 1:

         break;

         case 2:

            goto label_1952;

         break;

         } // end switch

         say( "Good! Beware, though -- a magical item can only hold a certain measure of energy -- too much may destroy it!" );
         func_108c();
         label_1952:;

         say( "Well, keep it in reserve -- 'tis a powerful spell!" );
         func_108c();
      } // end if

      say( "For the moment, you must continue isolating thy plane from the Guardian's lines of power." );
      func_108c();
   } // end if

} // end func

void func_195f() {

   int locals[31];

   locals[4] = 224;
   locals[5] = 225;
   locals[6] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

      goto label_19a4;

   break;

   case 2:

   break;

   } // end switch

   say( "Then please return with them as soon as possible. I may be discovered at any time." );
   func_0156();
   label_19a4:;

   locals[1] = find_barter( 1, &locals[26] );
   locals[26] = 279;
   locals[2] = find_barter( 1, &locals[27] );
   locals[27] = 275;
   locals[3] = find_barter( 1, &locals[28] );
   locals[28] = 168;
   if ( locals[1] && locals[2] && locals[3] ) {

      locals[29] = 1;
      give_ptr_npc( 2, &locals[29], &locals[1] );
      locals[30] = 1;
      give_ptr_npc( 2, &locals[30], &locals[2] );
      locals[31] = 1;
      give_ptr_npc( 2, &locals[31], &locals[3] );
   } else {

      say( "Where are they? I must have all three." );
   } // end if

} // end func

void func_1a24() {

   int locals[22];

   say( "On each world, thou shalt find some who know its past, its story. They shall tell thee of the Guardian's work there, where his power on that world lies -- thou mayst judge for thyself what sort of "Guardian" he is!" );
   locals[1] = 229;
   locals[2] = 230;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_1a6f();
   break;

   } // end switch

   say( "Excellent! At last, I have an ally of courage!" );
   func_0165();
} // end func

void func_1a6f() {

   int locals[23];

   say( "Avatar, I took thee for a brave @GS36. It would seem I was mistaken." );
   locals[1] = 233;
   locals[2] = 234;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_1ac0;

   break;

   } // end switch

   say( "Excellent! At last, I have an ally of courage!" );
   locals[23] = 3;
   func_0136( &locals[23] );
   label_1ac0:;

   say( "I am sure thy fellow Britannians feel the same way!" );
   func_0156();
} // end func

void func_1ac8() {

   int locals[23];

   if ( locals[1] ) {

      say( "@GS8, thou hast done it, though I scarcely believed it possible. The Guardian can no longer draw magical energy from the planes surrounding thine own. His spell there must be growing feeble indeed!" );
      locals[2] = 238;
      locals[3] = 239;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         func_1b6e();
      break;

      case 2:

         func_1b19();
      } // end if

   } else {

   break;

   } // end switch

   func_1b19();
} // end func

void func_1b19() {

   int locals[22];

   say( "We can do no more here. Though you have weakened the Guardian's power on thine own plane, the spell he cast retains its original structure -- you must apply a disruptive force to it to destroy it. That I cannot help thee with -- you must seek that force somewhere among the many worlds thou hast access to." );
   locals[1] = 241;
   locals[2] = 242;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_1b6e();
   break;

   case 2:

      func_1b61();
   break;

   } // end switch

} // end func

void func_1b61() {

   say( "I wish thee luck, Avatar." );
   func_0165();
} // end func

void func_1b6e() {

   say( "I blush to accept thy thanks, Avatar, as I have spent the hours sitting home in my laboratory, while thou didst brave the dangers of this labyrinth of worlds. Thou'rt a brave soul, @GS8, and I wish thee good fortune in thy travels." );
   func_0165();
} // end func

void func_1b7b() {

   int locals[29];

   say( "You want another chance? After what you did to me? If that dagger had been worth anything, I would be dead now! You want a chance, you can bring me Relk the security chief's head on a platter, that's what you can do!" );
   locals[1] = 246;
   locals[2] = 247;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   locals[23] = 248;
   print( 1, &locals[23] );
   locals[24] = 19;
   locals[25] = 49;
   locals[26] = 17;
   teleport_player( 3, &locals[26], &locals[25], &locals[24] );
   locals[27] = 19;
   locals[28] = 50;
   locals[29] = 1;
   gronk_door( 3, &locals[29], &locals[28], &locals[27] );
   private[9] = 1;
   func_0156();
} // end func

void func_1c14() {

   int locals[110];

   locals[25] = 0;
   locals[26] = 249;
   print( 1, &locals[26] );
   say( "Oh, really? Thou hast brought to me Relk's head? Show it to me, then!" );
   locals[27] = 251;
   locals[28] = 252;
   locals[29] = 0;
   locals[48] = babl_menu( 0, &locals[27] );
   switch ( locals[48] ) {

   case 1:

   break;

   case 2:

      goto label_1e23;

   break;

   } // end switch

   label_1c6a:;

   locals[49] = 194;
   locals[50] = -1;
   find_barter_total( 4, &locals[3], &locals[4], &locals[50], &locals[49] );
   switch ( locals[3] ) {

   case 0:

      say( "Well, where is it then?" );
      locals[51] = 254;
      locals[52] = 255;
      locals[53] = 0;
      locals[72] = babl_menu( 0, &locals[51] );
      switch ( locals[72] ) {

      case 1:

         goto label_1e23;

      break;

      case 2:

         goto label_1c6a;

      break;

      } // end switch

   break;

   } // end switch

   switch ( locals[3] ) {

   case 1:

      locals[73] = 0;
      locals[74] = 0;
      locals[75] = 0;
      locals[76] = 0;
      locals[77] = 0;
      locals[78] = 0;
      locals[79] = 0;
      x_obj_stuff( 9, &locals[79], &locals[78], &locals[77], &locals[76], &locals[75], &locals[1], &locals[74], &locals[73], &locals[4] );
      if ( locals[1] == 61 ) {

      } else {

         say( "What . . . is this? A head, but . . . not his! Please get this out of here. This is disgusting!" );
         func_0156();
      break;

      case 1:

         show_inv( 2, &locals[18], &locals[11] );
         while ( locals[25] <= 6 ) {

            locals[25] = locals[25] + 1;
            locals[80] = 0;
            locals[81] = 0;
            locals[82] = 0;
            locals[83] = 0;
            locals[84] = 0;
            locals[85] = 0;
            locals[86] = 0;
            x_obj_stuff( 9, &locals[86], &locals[85], &locals[84], &locals[83], &locals[82], &locals[1], &locals[81], &locals[80], &locals[17] );
            if ( locals[1] == 61 ) {

            } else {

            } // while

            say( "What . . . is this? Heads, but . . . none of them his! Please get these out of here. This is disgusting!" );
            func_0156();
         break;

      } // end if

   } // end if

   say( "What do you mean? I...I mean, I was joking, you...didn't really..." );
   locals[87] = 259;
   print( 1, &locals[87] );
   say( "Th-that's it, isn't it? Y-you are for real, aren't you? Look, we don't have much time." );
   locals[88] = 11;
   set_quest( 1, &locals[88] );
   private[9] = 0;
   func_162b();
   say( "I have no time for this silly game. Get the head, or leave me alone." );
   locals[89] = 262;
   locals[90] = 263;
   locals[91] = 0;
   locals[110] = babl_menu( 0, &locals[89] );
   locals[110] == 1;  // expr. has value on stack!
   } // end switch

   if ( locals[110] == 2 ) {

   } // end if

   say( "Goodbye." );
   func_0165();
   label_1e23:;

   label_1e23:;

   say( "Then return when thou dost!" );
   func_0156();
} // end func

void func_1e2b() {

   say( "He and Mystell are the Guardian's watchdogs around here. Unlike Mystell, he's probably being groomed for some command position. If anybody, drunk or sober, says the wrong thing, he's the one who reports it back to the capital. If you want me to believe you're not the stooge you act like, go get his head." );
} // end func

void func_1e36() {

   int locals[44];

   setup_to_barter( 0 );
   locals[1] = 267;
   locals[2] = 268;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_1eb6;

   break;

   } // end switch

   if ( give_all_stuff( 0 ) ) {

      say( "Thou'rt welcome!" );
   } else {

      say( "Please take whatever thou dost need." );
   } // end if

   locals[23] = 271;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

   } // end if

   return;

   label_1eb6:;

   do_decline( 0 );
} // end func

void func_1ebe() {

   int locals[9];

   say( "I knew thou wouldst see the right path." );
   locals[1] = take_from_npc( 1, &locals[2] );
   locals[2] = 10;
   switch ( locals[1] ) {

   case 1:

      private[7] = 0;
      locals[3] = 15;
      locals[4] = 1;
      set_quest( 2, &locals[4], &locals[3] );
      locals[5] = 3;
      func_0136( &locals[5] );
   break;

   case 2:

      say( "I see thou'rt heavily encumbered -- I will leave it for thee here." );
      locals[6] = 15;
      locals[7] = 1;
      set_quest( 2, &locals[7], &locals[6] );
      private[7] = 0;
      locals[8] = 3;
      func_0136( &locals[8] );
   break;

   case 3:

      say( "Perhaps thou shouldst come back for it later." );
      locals[9] = 3;
      func_0136( &locals[9] );
   break;

   } // end switch

} // end func

void func_1f52() {

   int locals[22];

   say( "Art thou sure? Thy world shall benefit more than mine, if this can be completed." );
   locals[1] = 276;
   locals[2] = 277;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      return;

   break;

   case 2:

   break;

   } // end switch

   say( "Then return if thou dost change thy mind.  I warn thee, Avatar, thou art denying thyself a powerful advantage." );
   func_0156();
} // end func

conversation #47
string block 0x0e2e, name Mors Gotha

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04d9();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[106];

   if ( npc_hp < 5 ) {

      say( "OW! I'm Jerry the Rat, now cut it out!!!" );
      func_0156();
   } // end if

   locals[5] = 123;
   if ( get_quest( 1, &locals[5] ) ) {

      say( "Yeah, Relk's dead, boo hoo." );
   } // end if

   say( "I'm Jerry the Rat. What the fuck do you want?" );
   locals[6] = 20;
   locals[7] = 21;
   locals[8] = 0;
   locals[27] = babl_menu( 0, &locals[6] );
   switch ( locals[27] ) {

   case 1:

   break;

   case 2:

      func_0706();
   break;

   } // end switch

   locals[28] = 15;
   locals[29] = 9999;
   if ( x_skills( 2, &locals[29], &locals[28] ) > 15 ) {

      say( "Charming feller, aren't ye?" );
   } // end if

   say( "Wanna go up some levels?" );
   locals[30] = 24;
   locals[31] = 25;
   locals[32] = 0;
   locals[51] = babl_menu( 0, &locals[30] );
   switch ( locals[51] ) {

   case 1:

      goto label_059e;

   break;

   case 2:

   break;

   } // end switch

   say( "Tough luck, sucker." );
   label_059e:;

   say( "Presto." );
   locals[52] = 9999;
   x_exp( 1, &locals[52] );
   locals[1] = do_inv_create( 1, &locals[53] );
   locals[53] = 230;
   locals[54] = 1;
   locals[55] = 7;
   locals[56] = 65535;
   locals[57] = 12;
   locals[58] = 512 + 67;
   locals[59] = 65535;
   locals[60] = 65535;
   locals[61] = 65535;
   x_obj_stuff( 9, &locals[61], &locals[60], &locals[59], &locals[58], &locals[57], &locals[56], &locals[55], &locals[54], &locals[1] );
   say( "Oh, yeah, take this spooge oil.  You'll need it." );
   locals[62] = 230;
   take_from_npc( 1, &locals[62] );
   locals[63] = 29;
   locals[64] = 0;
   locals[84] = babl_menu( 0, &locals[63] );
   if ( locals[84] == 1 ) {

   } // end if

   say( "Oh, and while you're here, take all my stuff." );
   func_067b();
   locals[85] = 31;
   locals[86] = 0;
   locals[106] = babl_menu( 0, &locals[85] );
   if ( locals[106] == 1 ) {

   } // end if

} // end func

void func_067b() {

   int locals[25];

   locals[1] = 232;
   do_inv_create( 1, &locals[1] );
   locals[2] = 234;
   do_inv_create( 1, &locals[2] );
   locals[3] = 248;
   do_inv_create( 1, &locals[3] );
   setup_to_barter( 0 );
   locals[4] = 32;
   locals[5] = 33;
   locals[6] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

   break;

   case 2:

      goto label_06fe;

   break;

   } // end switch

   if ( give_all_stuff( 0 ) ) {

      say( "Fair enough." );
   } else {

      say( "Wait.  Which things?" );
   } // end if

   return;

   label_06fe:;

   do_decline( 0 );
} // end func

void func_0706() {

   say( "Look here, you pointless piece of Garbage, I can't believe you would every be so bleeding useless as to bother asking me to do this, i mean, seriously, I'm an Artist, i cant just do this, It hurts, you understand me, it HURTS... i cant just live in thrall to your petty demands and needs, what about me, the rat. Think about it.  Everyone comes up and says... oh look, jerry the fucking rat, what a bore.  But from where i crawl, i think, this really sucks, what a pain, all these pointless people coming by" );
   do_input_wait( 0 );
   say( "and wasting my time.  If i had my way, i'd kill Lord British,buy EA, sell them off to get an airplane, fly to havana and crash it into a cheap mexican food place so i could have a few good tacos before it all ends, ya know." );
   func_0165();
} // end func

conversation #48
string block 0x0e2f, name wisp

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0380();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_0380() {

   int locals[403];

   npc_goal = 12;
   if ( private[0] == 0 ) {

      private[3] = 0;
      private[2] = 1;
      locals[3] = 0;
      locals[4] = 0;
   } // end if

   if ( npc_hp < 10 ) {

      if ( dungeon_level == 17 ) {

         private[2] = 0;
         say( "Guardian? Guardian!!?" );
         locals[5] = 3;
         print( 1, &locals[5] );
         locals[6] = 4;
         print( 1, &locals[6] );
         say( "Wait, wait! I need that spellboo-" );
         locals[7] = 6;
         print( 1, &locals[7] );
         locals[8] = 117;
         locals[9] = 1;
         set_quest( 2, &locals[9], &locals[8] );
         remove_talker( 0 );
         func_0165();
      } else {

         say( "Guardian? Guardian, get me out of here!" );
         locals[10] = 8;
         print( 1, &locals[10] );
         say( "God DAMN it." );
         func_0110();
      } // end if

   } // end if

   locals[11] = 54;
   if ( get_quest( 1, &locals[11] ) ) {

      say( "So, Avatar -- for surely, 'tis thee -- how dost thou like thy handiwork?" );
      locals[12] = 11;
      print( 1, &locals[12] );
      say( "Well?" );
      locals[13] = 13;
      locals[14] = 14;
      locals[15] = 15;
      locals[16] = 0;
      locals[34] = babl_menu( 0, &locals[13] );
      switch ( locals[34] ) {

      case 1:

         goto label_068c;

      break;

      case 2:

         goto label_06e5;

      break;

      case 3:

      } else {

      break;

      } // end switch

      locals[35] = 50;
      if ( get_quest( 1, &locals[35] ) ) {

         say( "This is your doing isn't it, Avatar? Thou hast driven me from this place, but soon I shall take the battle to the halls of Castle British itself! In the meantime, I suggest that you make a hasty exit from this dimension, before we reach the ground!" );
         locals[36] = 17;
         print( 1, &locals[36] );
         remove_talker( 0 );
         private[2] = 0;
         func_0110();
      } // end if

      if ( private[3] == 0 ) {

         private[2] = 0;
         private[3] = 1;
         say( "Yes? What is it?" );
         locals[37] = 19;
         locals[38] = 20;
         locals[39] = 21;
         locals[40] = 22;
         locals[41] = 0;
         locals[58] = babl_menu( 0, &locals[37] );
         switch ( locals[58] ) {

         case 1:

            goto label_054e;

         break;

         case 2:

            goto label_0546;

         break;

         case 3:

            goto label_054b;

         break;

         case 4:

            goto label_0775;

         } // end if

      } else {

      break;

      } // end switch

      say( "I gave thee one chance, Avatar. One only." );
      func_0110();
      label_0546:;

      say( "Spare me thy deceptions." );
      goto label_054e;

      label_054b:;

      say( "Do not move." );
      label_054e:;

      label_054e:;

      say( "Didst thou think I would not know thee, Avatar? I knew thou wert abroad among the planes -- thy arrival here was inevitable." );
      locals[59] = 27;
      locals[60] = 28;
      locals[61] = 29;
      locals[62] = 0;
      locals[80] = babl_menu( 0, &locals[59] );
      switch ( locals[80] ) {

      case 1:

         goto label_05a2;

      break;

      case 2:

         goto label_068c;

      break;

      case 3:

         goto label_0775;

      break;

      } // end switch

      label_05a2:;

      say( "Ever since you smashed the Black Gate I have been anticipating this encounter. Did you know I've never been defeated in the Guardian's service?" );
      locals[1] = get_quest( 1, &locals[81] );
      locals[81] = 9;
      locals[103] = 1;
      locals[82] = 31;
      locals[104] = 1;
      locals[83] = 32;
      locals[105] = locals[1];
      locals[84] = 33;
      locals[85] = 0;
      locals[124] = babl_fmenu( 0, &locals[82], &locals[103] );
      switch ( locals[124] ) {

      case 31:

         goto label_0625;

      break;

      case 32:

      break;

      case 33:

         goto label_075d;

      break;

      } // end switch

      say( "I hope I have not upset thee." );
      label_0625:;

      say( "Thou hast one chance to beg for thy life. If thou dost wish it, I shall disarm thee and thou mayst surrender. What sayest thou?" );
      locals[125] = 36;
      locals[126] = 37;
      locals[127] = 38;
      locals[128] = 0;
      locals[146] = babl_menu( 0, &locals[125] );
      switch ( locals[146] ) {

      case 1:

         goto label_068c;

      break;

      case 2:

         goto label_0770;

      break;

      case 3:

         goto label_0679;

      break;

      } // end switch

      label_0679:;

      locals[147] = 39;
      print( 1, &locals[147] );
      say( "@GS8, you disappoint me -- I had thought thee an opponent worth honoring. Thou didst cost the Guardian too much pride to be allowed to live." );
      func_0110();
      label_068c:;

      label_068c:;

      label_068c:;

      label_068c:;

      label_068c:;

      say( "You see, @GS8? We are not that different after all! Thou wert e'er as bloodthirsty as I, if not more so." );
      locals[148] = 42;
      locals[149] = 43;
      locals[150] = 44;
      locals[151] = 0;
      locals[169] = babl_menu( 0, &locals[148] );
      switch ( locals[169] ) {

      case 1:

         goto label_06e0;

      break;

      case 2:

         goto label_06e5;

      break;

      case 3:

         goto label_0846;

      break;

      } // end switch

      label_06e0:;

      say( "And how many hast thou slain in thy questing? Thou dost kill to gain thine ends, just as do I." );
      goto label_06e8;

      label_06e5:;

      label_06e5:;

      say( "Poor, poor Avatar! Thou'rt caught between thy master's virtues and thine own bloodlust. Perhaps thou shouldst join me, and serve a more . . . entertaining master." );
      label_06e8:;

      locals[170] = 47;
      locals[171] = 48;
      locals[172] = 49;
      locals[173] = 0;
      locals[191] = babl_menu( 0, &locals[170] );
      switch ( locals[191] ) {

      case 1:

         goto label_074a;

      break;

      case 2:

         goto label_073c;

      break;

      case 3:

         goto label_07f1;

      break;

      } // end switch

      say( "Yes, I suppose thou must think so." );
      label_073c:;

      locals[192] = 51;
      print( 1, &locals[192] );
      label_074a:;

      say( "Then let's get down to business." );
      locals[193] = 53;
      print( 1, &locals[193] );
      func_0110();
      label_075d:;

      say( "That runt got lucky! I've had enough o'this!" );
      locals[194] = 100;
      x_exp( 1, &locals[194] );
      func_0110();
      label_0770:;

      say( "As you wish, Avatar." );
      func_0110();
   } // end if

   label_0775:;

   label_0775:;

   say( "Why, I am Mors Gotha." );
   locals[195] = 57;
   locals[196] = 58;
   locals[197] = 0;
   locals[216] = babl_menu( 0, &locals[195] );
   switch ( locals[216] ) {

   case 1:

   break;

   case 2:

      goto label_068c;

   break;

   } // end switch

   say( "I am here to invade thy world, through the blackrock gate. Wouldst thou join me?" );
   locals[217] = 60;
   locals[218] = 61;
   locals[219] = 0;
   locals[238] = babl_menu( 0, &locals[217] );
   switch ( locals[238] ) {

   case 1:

      goto label_068c;

   break;

   case 2:

   break;

   } // end switch

   label_07f1:;

   say( "Because in all the many worlds, thou art the person most like myself." );
   locals[239] = 63;
   locals[240] = 64;
   locals[241] = 65;
   locals[242] = 0;
   locals[260] = babl_menu( 0, &locals[239] );
   switch ( locals[260] ) {

   case 1:

   break;

   case 2:

      goto label_0846;

   break;

   case 3:

      goto label_0846;

   break;

   } // end switch

   say( "Now, now, Avatar." );
   label_0846:;

   label_0846:;

   label_0846:;

   say( "We are twins, you and I! We champion the great Causes in life. Thou art not of the common rabble, Avatar, nor am I!" );
   locals[261] = 68;
   locals[262] = 69;
   locals[263] = 0;
   locals[282] = babl_menu( 0, &locals[261] );
   switch ( locals[282] ) {

   case 1:

   break;

   case 2:

      goto label_0887;

   break;

   } // end switch

   say( "Do not be naive, Avatar!" );
   label_0887:;

   say( "We have nothing to do with the mass of men, we two. We walk across the many worlds; by our actions, entire nations crash down or are saved from death. We two are the only ones to see the grandeur, the full scope of this war. And yet you choose to be bound to your rustic Britannia, your feeble Lord British! Why?" );
   locals[283] = 72;
   locals[284] = 73;
   locals[285] = 74;
   locals[286] = 75;
   locals[287] = 0;
   locals[304] = babl_menu( 0, &locals[283] );
   switch ( locals[304] ) {

   case 1:

   break;

   case 2:

      goto label_0901;

   break;

   case 3:

   break;

   case 4:

      goto label_0901;

   break;

   } // end switch

} // end if

label_08eb:;

label_08eb:;

label_08eb:;

say( "Thou art a petty thinker, Avatar! I had thought thee more than this." );
locals[305] = 77;
print( 1, &locals[305] );
say( "Guards! Help me dispose of this waste!" );
func_0110();
label_0901:;

label_0901:;

say( "Join us, then! Come with me to serve our Guardian! Together, we shall walk the sands of a hundred worlds; a thousand monarchs shall bend their knees before us; and the pleasures, Avatar . . . 'tis not to believed! Thou hast only to say yes, to me." );
locals[306] = 80;
locals[307] = 81;
locals[308] = 0;
locals[327] = babl_menu( 0, &locals[306] );
switch ( locals[327] ) {

case 1:

   goto label_0941;

break;

case 2:

   goto label_08eb;

break;

} // end switch

label_0941:;

locals[328] = 1000;
locals[329] = 1;
if ( find_inv( 2, &locals[329], &locals[328] ) ) {

   locals[4] = 0;
   say( "Thou hast only to give over thy weapon, Avatar, a sign of thy decision, and we shall away, off to the palace of the Guardian, in the Pagan world." );
   locals[330] = 83;
   locals[331] = 84;
   locals[332] = 0;
   locals[351] = babl_menu( 0, &locals[330] );
   switch ( locals[351] ) {

   case 1:

   break;

   case 2:

      goto label_08eb;

   } // end if

} else {

break;

} // end switch

locals[352] = 143;
locals[353] = 1;
if ( find_inv( 2, &locals[353], &locals[352] ) ) {

   locals[4] = 1;
   say( "Thou hast only to give over thy runebag, Avatar, a sign of thy decision, and we shall away, off to the palace of the Guardian, in the Pagan world." );
   locals[354] = 86;
   locals[355] = 87;
   locals[356] = 0;
   locals[375] = babl_menu( 0, &locals[354] );
   switch ( locals[375] ) {

   case 1:

   break;

   case 2:

      goto label_08eb;

   } // end if

} else {

break;

} // end switch

say( "So, @GS8, thy heart is not so given over to virtue as thou didst think! Thy commitment to Virtue is every bit as hollow as I had suspected.  But didst thou really think I would share my position with thee?" );
locals[376] = 89;
print( 1, &locals[376] );
func_0110();
label_0a12:;

if ( locals[4] == 0 ) {

   locals[2] = find_barter( 1, &locals[377] );
   locals[377] = 1000;
} else {

   locals[2] = find_barter( 1, &locals[378] );
   locals[378] = 143;
} // end if

if ( locals[2] ) {

   locals[379] = 1;
   give_ptr_npc( 2, &locals[379], &locals[2] );
   say( "That's the spirit, @GS8!" );
   locals[380] = 91;
   print( 1, &locals[380] );
   say( "But power is not a thing to be shared, Avatar. 'Tis a pity, but 'tis true." );
   locals[381] = 93;
   print( 1, &locals[381] );
   func_0110();
} else {

   say( "Come, Avatar, 'tis no great thing to ask." );
} // end if

label_0a7f:;

locals[382] = 95;
locals[383] = 96;
locals[384] = 0;
locals[403] = babl_menu( 0, &locals[382] );
switch ( locals[403] ) {

case 1:

   goto label_0a12;

break;

case 2:

break;

} // end switch

locals[3] = locals[3] + 1;
if ( locals[3] > 2 ) {

   say( "Enough of thy games." );
} else {

   say( "Please, Avatar. Surely such a thing poses little risk to thee -- 'tis merely a sign that thou'rt in earnest." );
   goto label_0a7f;

} // end func

conversation #49
string block 0x0e30, name Relk

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[226];

   private[4] = get_quest( 1, &locals[1] );
   locals[1] = 47;
   if ( private[0] == 0 ) {

      private[2] = 1;
      private[3] = 1;
      private[6] = 0;
      private[5] = 0;
      say( ""I" am informed that "thou" art a being known as "Avatar." And yet, you resonate at an unusual frequency for one with "your" creature-designation. Excuse me -- in "thy" terms, one would say "thou" art not ordinarily found on this "plane."" );
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         goto label_0434;

      break;

      case 2:

         goto label_04b7;

      } // end if

   } else {

   break;

   } // end switch

   if ( private[5] ) {

      say( "I greet thee, "Avatar." Should "I" seek further trades with "thee," "thou" shalt be contacted." );
      func_0147();
   } else {

      if ( private[6] == 2 ) {

         say( "Dost "thou" have a "question" for "us"?" );
      } else {

         if ( private[6] ) {

            say( "Hast "thou" determined the "fate" of "Bishop?"" );
         } else {

            say( "I "greet" thee, "Avatar." Hast thou returned to trade with "me"?" );
            locals[24] = 8;
            locals[25] = 9;
            locals[26] = 0;
            locals[45] = babl_menu( 0, &locals[24] );
            switch ( locals[45] ) {

            case 1:

               goto label_0537;

            break;

            case 2:

               func_0714();
            } // end if

         break;

         } // end switch

         label_0434:;

         say( "Beings of "my" sort are commonly designated "wisps" by your species. We are beings of pure energy." );
         locals[46] = 11;
         locals[47] = 12;
         locals[48] = 0;
         locals[67] = babl_menu( 0, &locals[46] );
         switch ( locals[67] ) {

         case 1:

            goto label_04f7;

         break;

         case 2:

            goto label_0474;

         break;

         } // end switch

         label_0474:;

         say( "It is as much a mystery to us that a sentient creature can be made of matter!" );
         locals[68] = 14;
         locals[69] = 15;
         locals[70] = 0;
         locals[89] = babl_menu( 0, &locals[68] );
         switch ( locals[89] ) {

         case 1:

            goto label_04f7;

         break;

         case 2:

         break;

         } // end switch

         say( "This is unfortunate, but it is no concern of ours." );
         goto label_04b7;

         label_04b7:;

         label_04b7:;

         say( "We want information." );
         locals[90] = 18;
         locals[91] = 19;
         locals[92] = 0;
         locals[111] = babl_menu( 0, &locals[90] );
         switch ( locals[111] ) {

         case 1:

            func_0714();
         break;

         case 2:

            goto label_0537;

         break;

         } // end switch

         label_04f7:;

         label_04f7:;

         say( ""We" trade amongst the sentient "species" for information. I am informed that you, "Avatar," have "travelled" to many areas whose energy-properties have become dangerous to us, due to the presence of "he" who is known as "The Guardian." Will you trade with us for information about such places?" );
         locals[112] = 21;
         locals[113] = 22;
         locals[114] = 0;
         locals[133] = babl_menu( 0, &locals[112] );
         switch ( locals[133] ) {

         case 1:

            goto label_0537;

         break;

         case 2:

            func_0721();
         break;

         } // end switch

         label_0537:;

         label_0537:;

         label_0537:;

         say( ""Thou" hast visited the "place" wherein is "imprisoned" the one called "Bishop." His role in certain affairs has become disproportionately large." );
         locals[134] = 24;
         locals[135] = 25;
         locals[136] = 0;
         locals[155] = babl_menu( 0, &locals[134] );
         switch ( locals[155] ) {

         case 1:

         break;

         case 2:

            goto label_0578;

         break;

         } // end switch

         say( ""Thou" shouldst not presume upon our limited "acquaintance," "Avatar."" );
         label_0578:;

         say( "We wish to know of his fate following his imprisonment." );
         private[6] = 1;
      } // end if

      locals[156] = 28;
      locals[157] = 29;
      locals[158] = 30;
      locals[159] = 31;
      locals[160] = 0;
      locals[177] = babl_menu( 0, &locals[156] );
      switch ( locals[177] ) {

      case 1:

         goto label_05e5;

      break;

      case 2:

         goto label_0614;

      break;

      case 3:

         func_072e();
      break;

      case 4:

         func_0721();
      break;

      } // end switch

      label_05e5:;

      locals[178] = 2;
      if ( get_quest( 1, &locals[178] ) ) {

         locals[179] = 1;
         if ( get_quest( 1, &locals[179] ) ) {

         } else {

            say( ""I" thank "thee," although this datum indicates that "wisps" shall be barred from obtaining data on that "world" for some "time" to come." );
         } else {

            goto label_063e;

            label_0614:;

            locals[180] = 1;
            (get_quest( 1, &locals[180] ) || get_quest( 1, &locals[181] ));  // expr. has value on stack!
            if ( locals[181] = 0 ) {

               say( ""I" thank "thee." Perhaps soon we shall again be obtaining data from that "plane."" );
            } else {

            } // end if

            label_063e:;

            say( "This datum is inconsistent with other data which have been placed at my disposal, and therefore I conclude that it is erroneous. Please investigate the matter more fully, if thou dost wish to trade." );
            func_0147();
         } // end if

      } // end if

      say( "May I offer thee information in return?" );
   } // end if

   label_0646:;

   label_0646:;

   locals[203] = private[2];
   locals[182] = 36;
   locals[204] = private[3];
   locals[183] = 37;
   locals[205] = private[4];
   locals[184] = 38;
   locals[206] = 1;
   locals[185] = 39;
   locals[186] = 0;
   locals[224] = babl_fmenu( 0, &locals[182], &locals[203] );
   switch ( locals[224] ) {

   case 36:

      goto label_06d9;

   break;

   case 37:

      goto label_06e3;

   break;

   case 38:

      goto label_06ed;

   break;

   case 39:

   break;

   } // end switch

   say( "Then perhaps "thou" shalt have some "thing" to ask "me" at a later "time."" );
   private[6] = 2;
   func_0147();
   label_06d9:;

   say( "Our data do not show a single "factor" capable of removing the gem. Dost thou have another question to ask?" );
   private[2] = 0;
   goto label_0646;

   label_06e3:;

   say( "From the point of "view" of material "entities" such as "thyself," the void presents a landscape which is constantly metamorphosing -- to "us" it seems very different. I would be of little help to thee in this. Dost thou have another question to ask?" );
   private[3] = 0;
   goto label_0646;

   label_06ed:;

   say( "The Trilkhai were once a powerful group of anthropomorphic "felines." Since their catastrophic "loss" to a group of humanoids, they have since devolved "past" the point of "tool-using."" );
   locals[225] = 118;
   locals[226] = 1;
   set_quest( 2, &locals[226], &locals[225] );
   private[5] = 1;
   say( "It has been "productive" trading information with "thee."" );
   func_0147();
} // end func

void func_0714() {

   say( ""Please" return if "thou" art willing to trade." );
   func_0147();
} // end func

void func_0721() {

   say( ""We" understand that "thou" hast certain "interests" apart from the acquisition and distribution of information. However, "we" are not obliged to "honor" them." );
   func_0714();
} // end func

void func_072e() {

   say( "Thou shouldst return if thou dost learn more." );
   func_0147();
} // end func

conversation #50
string block 0x0e31, name Lord Thibris

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0380();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_0380() {

   int locals[96];

   locals[6] = 50;
   if ( get_quest( 1, &locals[6] ) ) {

      func_035a();
   } // end if

   if ( private[0] == 0 ) {

      locals[5] = 0;
   } // end if

   locals[7] = 2;
   print( 1, &locals[7] );
   func_00bd( &locals[4], &locals[3], &locals[2] );
   locals[1] = get_quest( 1, &locals[8] );
   locals[8] = 19;
   if ( private[0] == 0 ) {

      npc_goal = 7;
      say( "I am pleased to meet thee, @GS8. I am Relk, captain of the Guards. Do come visit me in my quarters in the southwest some time -- I am sure we have much to discuss." );
      locals[30] = 1;
      locals[9] = 4;
      locals[31] = locals[1];
      locals[10] = 5;
      locals[32] = 1;
      locals[11] = 6;
      locals[12] = 0;
      locals[51] = babl_fmenu( 0, &locals[9], &locals[30] );
      switch ( locals[51] ) {

      case 4:

         func_04cb();
      break;

      case 5:

         func_0596();
      break;

      case 6:

         func_0564();
      } // end if

   } else {

   break;

   } // end switch

   say( "Welcome to my quarters, @GS8... or should I say, "Avatar?"" );
   locals[73] = 1;
   locals[52] = 8;
   locals[74] = locals[1];
   locals[53] = 9;
   locals[54] = 0;
   locals[94] = babl_fmenu( 0, &locals[52], &locals[73] );
   switch ( locals[94] ) {

   case 8:

   break;

   case 9:

      func_0596();
   break;

   } // end switch

   locals[95] = 10;
   print( 1, &locals[95] );
   say( "Did you really think your coming was not foretold?\m" );
   locals[96] = 12;
   print( 1, &locals[96] );
   say( "See, Guardian, see how well I serve you! It is not Lobar who deserves the blessing of thy voice, but I, Relk!\m" );
   say( "I shall show thee, Master, thou wert right to inform me of the Britannian's coming! See how well thou hast chosen!" );
   func_0110();
} // end func

void func_04cb() {

   int locals[26];

   locals[1] = 41;
   locals[2] = 35;
   teleport_talker( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   print( 1, &locals[3] );
   say( "I have, er... heard that thou'rt... uh, wise in the way of virtue. Is this not so?" );
   locals[4] = 17;
   locals[5] = 18;
   locals[6] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

      func_0549();
   break;

   case 2:

   break;

   } // end switch

   say( "Than I shall teach thee of it. I shall expect thee." );
   locals[26] = 20;
   print( 1, &locals[26] );
   func_0156();
} // end func

void func_0549() {

   int locals[1];

   say( "Than we shall speak on that subject. Until later." );
   locals[1] = 22;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0564() {

   int locals[3];

   locals[1] = 41;
   locals[2] = 35;
   teleport_talker( 2, &locals[2], &locals[1] );
   say( "'Tis a small keep, Av... er, @GS8. Do come see me." );
   locals[3] = 24;
   print( 1, &locals[3] );
   func_0156();
} // end func

void func_0596() {

   int locals[67];

   say( "Uh... what dost thou mean, a black gem?" );
   locals[1] = 26;
   locals[2] = 27;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_06f7();
   break;

   case 2:

   break;

   } // end switch

   say( "Oh, THAT gem! 'Twas nothing, merely a gift from my... sister." );
   locals[23] = 29;
   locals[24] = 30;
   locals[25] = 31;
   locals[26] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_06f7();
   break;

   case 2:

   break;

   case 3:

      func_067d();
   break;

   } // end switch

   say( "How dost thou know these things! Did Nocticle Sartre send thee? 'Twas a top secret assignment from the Guardian himself!" );
   locals[45] = 33;
   locals[46] = 34;
   locals[47] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "Had I known thou wert so well-informed, I would have killed thee long before this. 'Tis almost as if thou didst spy on me, there in the engine room. Come, we shall settle the matter now." );
   locals[67] = 36;
   print( 1, &locals[67] );
   func_0110();
} // end func

void func_067d() {

   int locals[26];

   locals[1] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 37;
   locals[3] = 38;
   say( "You would threaten an officer of the Guardian's realm? I warn thee, @GS8, do not start anything with me!" );
   locals[4] = 40;
   locals[5] = 41;
   locals[6] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

   break;

   case 2:

      goto label_06de;

   break;

   } // end switch

   say( "Thou hast a queer way of jesting, @GS8!" );
   label_06de:;

   say( "Guards...GUARDS!" );
   locals[26] = 44;
   print( 1, &locals[26] );
   say( "Lazy provincials . . . ! In any case, I shall teach thee what it means to threaten me! In the meantime, I shall tell thee -- I retrieved that gem from the engine room, on a SPECIAL SECRET MISSION from the GUARDIAN HIMSELF! And THOU HAST INTERFERED! I have no choice but to destroy thee utterly! Er . . . not that I mind, or anything." );
   func_0110();
} // end func

void func_06f7() {

   int locals[22];

   say( "Nay, I insist. How dost thou know of such a thing?" );
   locals[1] = 47;
   locals[2] = 48;
   locals[3] = 49;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0751;

   break;

   case 3:

      goto label_0751;

   break;

   } // end switch

   say( "Art thou mad? A talking cat?" );
   label_0751:;

   label_0751:;

   say( "Do not attempt to deceive me. Thou art a spy, fool, and soon thou shalt die for it!" );
   func_0110();
} // end func

conversation #51
string block 0x0e32, name soldier

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_043a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_0414() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_043a() {

   int locals[360];

   locals[6] = 50;
   if ( get_quest( 1, &locals[6] ) ) {

      func_0414();
   } // end if

   locals[5] = sex( 2, &locals[8], &locals[7] );
   locals[7] = 2;
   locals[8] = 3;
   if ( private[0] == 0 ) {

      private[2] = 0;
      locals[1] = 1;
      locals[2] = 1;
      locals[3] = 0;
   } // end if

   if ( private[0] == 0 ) {

      say( "Greetings, my @SS5!" );
      locals[9] = 5;
      locals[10] = 6;
      locals[11] = 0;
      locals[30] = babl_menu( 0, &locals[9] );
      switch ( locals[30] ) {

      case 1:

         goto label_0581;

      break;

      case 2:

         goto label_0555;

      } // end if

   } else {

   break;

   } // end switch

   say( "Ah, my @SS5, thou hast come to see me again!" );
   locals[4] = func_035a( &locals[31] );
   locals[31] = 1000 + 2;
   locals[53] = 1;
   locals[32] = 8;
   locals[54] = locals[4];
   locals[33] = 9;
   locals[55] = 1;
   locals[34] = 10;
   locals[35] = 0;
   locals[74] = babl_fmenu( 0, &locals[32], &locals[53] );
   switch ( locals[74] ) {

   case 8:

      goto label_06aa;

   break;

   case 9:

      goto label_0581;

   break;

   case 10:

      goto label_08a1;

   break;

   } // end switch

   label_0555:;

   say( "I am Lord Thibris, Master of this Keep." );
   locals[75] = 12;
   locals[76] = 0;
   locals[96] = babl_menu( 0, &locals[75] );
   if ( locals[96] == 1 ) {

   } // end if

   label_0581:;

   label_0581:;

   locals[97] = 2;
   func_035a( &locals[97] );
   say( "Why this is Killorn Keep! A fine posting for an old soldier, I must say! A mile in the air, striking fear into the desert nomads. Very fine!" );
   locals[98] = 14;
   locals[99] = 15;
   locals[100] = 16;
   locals[101] = 0;
   locals[119] = babl_menu( 0, &locals[98] );
   switch ( locals[119] ) {

   case 1:

      goto label_0660;

   break;

   case 2:

      goto label_0620;

   break;

   case 3:

      goto label_05e0;

   break;

   } // end switch

   label_05e0:;

   say( "Well, er... I never thought about it much. 'Tis the Guardian's work, and it doesn't do to ask many questions, I've found!" );
   locals[120] = 18;
   locals[121] = 19;
   locals[122] = 0;
   locals[141] = babl_menu( 0, &locals[120] );
   switch ( locals[141] ) {

   case 1:

      goto label_0861;

   break;

   case 2:

      goto label_06a0;

   break;

   } // end switch

   label_0620:;

   say( "Oh, doubtless some scruffy rabble, not worth the trouble of enslaving." );
   locals[142] = 21;
   locals[143] = 22;
   locals[144] = 0;
   locals[163] = babl_menu( 0, &locals[142] );
   switch ( locals[163] ) {

   case 1:

      goto label_0861;

   break;

   case 2:

      goto label_0660;

   break;

   } // end switch

   label_0660:;

   label_0660:;

   say( "And a fine one, too! I served him well, in many commands, and on many worlds!" );
   locals[164] = 24;
   locals[165] = 25;
   locals[166] = 0;
   locals[185] = babl_menu( 0, &locals[164] );
   switch ( locals[185] ) {

   case 1:

      goto label_06a0;

   break;

   case 2:

      goto label_0861;

   break;

   } // end switch

   label_06a0:;

   label_06a0:;

   say( "Oho! Thou hast hit on my favorite subject! Wouldst thou hear of my work on the Praecor Loth campaign? 'Twas centuries ago, but I remember it as if it were this morning!" );
   locals[3] = 1;
   goto label_06b2;

   label_06aa:;

   label_06aa:;

   say( "I never tire of this story! Though 'twas centuries ago, I still remember it as my greatest triumph!" );
   locals[3] = 1;
   label_06b2:;

   label_06b2:;

   locals[207] = 1;
   locals[186] = 28;
   locals[208] = 1;
   locals[187] = 29;
   locals[209] = locals[3];
   locals[188] = 30;
   locals[189] = 0;
   locals[228] = babl_fmenu( 0, &locals[186], &locals[207] );
   switch ( locals[228] ) {

   case 28:

      goto label_071f;

   break;

   case 29:

      goto label_0854;

   break;

   case 30:

      goto label_084a;

   break;

   } // end switch

   label_071f:;

   say( "Oh, some barbarian king or other. 'Tis of no import now! The Guardian offered him peace, but he would not take it, and so I was sent to bring him down. 'Twas in the early battles there that the Killorn Banner was lost. Such a pity!" );
   locals[229] = 32;
   locals[230] = 33;
   locals[231] = 34;
   locals[232] = 0;
   locals[250] = babl_menu( 0, &locals[229] );
   switch ( locals[250] ) {

   case 1:

      goto label_08a6;

   break;

   case 2:

      goto label_0774;

   break;

   case 3:

   break;

   } // end switch

   label_0771:;

   say( "And deprive another world of the Guardian's peace? Art thou mad?" );
   label_0774:;

   label_0774:;

   say( "I drove him a thousand miles north of his capital, 'til he died and was buried in a great tomb carved into a cliff. His greatest treasure still rests there, a horn of extraordinary power!" );
   label_0777:;

   label_0777:;

   locals[272] = locals[1];
   locals[251] = 37;
   locals[273] = locals[2];
   locals[252] = 38;
   locals[274] = 1;
   locals[253] = 39;
   locals[254] = 0;
   locals[293] = babl_fmenu( 0, &locals[251], &locals[272] );
   switch ( locals[293] ) {

   case 37:

      goto label_07e5;

   break;

   case 38:

      goto label_07ef;

   break;

   case 39:

      goto label_07f9;

   break;

   } // end switch

   label_07e5:;

   say( "Why, the sound that came from it could shatter buildings! None could wield it but Praecor Loth himself, but the Guardian hoped to harness its power somehow." );
   locals[1] = 0;
   goto label_0777;

   label_07ef:;

   say( "Well, you know, we tried that, but they built the tomb very cleverly. There was supposed to be a map, divided in eight parts, hidden in the tomb, and it showed the way through a deadly maze. Most of my servants wouldn't enter the tomb at all, though. They feared the dead, the superstitious fools!" );
   locals[2] = 0;
   goto label_0777;

   label_07f9:;

   say( "Ah, yes." );
   locals[294] = 43;
   print( 1, &locals[294] );
   say( "'Twas a great day for the Guardian, then. Such a speech he gave!" );
   locals[295] = 45;
   locals[296] = 46;
   locals[297] = 0;
   locals[316] = babl_menu( 0, &locals[295] );
   switch ( locals[316] ) {

   case 1:

      goto label_0854;

   break;

   case 2:

      goto label_0861;

   break;

   } // end switch

   label_084a:;

   say( "Well, yes, er, it seems that on different worlds time runs differently... or perhaps I just age differently, or something. I never quite understood." );
   locals[3] = 0;
   goto label_06b2;

   label_0854:;

   label_0854:;

   label_0854:;

   say( "I understand, my @SS5. Go in peace, and never forget the six, er, eight virtues, especially the third one, er..." );
   pause( 0 );
   say( "Well anyway, never forget them!" );
   func_0147();
   label_0861:;

   label_0861:;

   label_0861:;

   label_0861:;

   say( "'Tis fabulous -- I remember in the final days of the Praecor Loth campaign, he came to us, freezing in our camp on the tundra, and gave us a wonderful display of magical fireworks! Two thirds of us came back with frostbite, but I tell thee, there was not a word of complaint!" );
   locals[317] = 51;
   locals[318] = 52;
   locals[319] = 0;
   locals[338] = babl_menu( 0, &locals[317] );
   switch ( locals[338] ) {

   case 1:

      goto label_06aa;

   break;

   case 2:

      goto label_0854;

   break;

   } // end switch

   label_08a1:;

   say( "Farewell, @GS8, and er... don't be a Stranger!" );
   func_0147();
   label_08a6:;

   say( "The Blue Banner of Killorn, the ancestral emblem of this place! In those days, there was still a Lord Killorn, who rode into battle with his standard." );
   locals[339] = 55;
   locals[340] = 56;
   locals[341] = 0;
   locals[360] = babl_menu( 0, &locals[339] );
   switch ( locals[360] ) {

   case 1:

      goto label_0774;

   break;

   case 2:

      goto label_0771;

   break;

   } // end switch

} // end func

conversation #52
string block 0x0e33, name Chirl

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04ff();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_04ff() {

   int locals[100];

   if ( private[0] == 0 ) {

      private[2] = 0;
      private[3] = 0;
      private[4] = 0;
   } // end if

   private[4] = func_0be4();
   if ( dungeon_level == 5 ) {

      locals[1] = 62;
      if ( get_quest( 1, &locals[1] ) == 0 ) {

         locals[2] = 62;
         locals[3] = 1;
         set_quest( 2, &locals[3], &locals[2] );
         say( "Well, MG told us to just scout around for the first wave, but I reckon I'm gonna be the first in my squadron to rack up a kill in the Britannia operation!" );
         locals[4] = 15;
         locals[5] = 15;
         locals[6] = 10001;
         locals[7] = x_clock( 2, &locals[6], &locals[5] ) + 1;
         x_clock( 2, &locals[7], &locals[4] );
         func_0110();
      } // end if

   } // end if

   locals[8] = 50;
   if ( get_quest( 1, &locals[8] ) ) {

      func_04d9();
   } // end if

   locals[9] = 54;
   if ( get_quest( 1, &locals[9] ) ) {

      if ( private[3] == 0 ) {

         say( "I don't know what you're doin', pokin' around these ruins, but you'd best clear out pretty fast!" );
         locals[10] = 20;
         locals[11] = 21;
         locals[12] = 0;
         locals[31] = babl_menu( 0, &locals[10] );
         switch ( locals[31] ) {

         case 1:

         break;

         case 2:

            goto label_065b;

         break;

         } // end switch

         if ( private[4] ) {

            locals[32] = 22;
            print( 1, &locals[32] );
            say( "Oh. Excuse me!" );
            locals[33] = 24;
            locals[34] = 25;
            locals[35] = 0;
            locals[54] = babl_menu( 0, &locals[33] );
            switch ( locals[54] ) {

            case 1:

               func_0147();
            break;

            case 2:

               func_0a90();
            } // end if

         } else {

         break;

         } // end switch

         locals[55] = 26;
         print( 1, &locals[55] );
         say( "You are, are you? Well, I don't talk to nobody who ain't wearin' the ring! Move along!" );
         func_0156();
         label_065b:;

         if ( private[4] ) {

            say( "A traveler, huh? Well, you're wearin' the ring, so I guess you're okay!" );
            func_0a90();
         } else {

            locals[56] = 29;
            print( 1, &locals[56] );
            say( "I suggest you keep travelling, and don't ask questions. Anybody not wearing the ring is a suspicious character, far as I'm concerned!" );
            func_0156();
         } // end if

      } else {

         say( "You again? What is it?" );
         if ( private[4] ) {

            locals[57] = 32;
            locals[58] = 33;
            locals[59] = 0;
            locals[78] = babl_menu( 0, &locals[57] );
            switch ( locals[78] ) {

            case 1:

               func_0a90();
            break;

            case 2:

            break;

            } // end switch

            say( "If you say so." );
            func_0147();
         } else {

            locals[79] = 35;
            locals[80] = 36;
            locals[81] = 0;
            locals[100] = babl_menu( 0, &locals[79] );
            switch ( locals[100] ) {

            case 1:

            break;

            case 2:

               func_0156();
            break;

            } // end switch

            say( "Tell it to Mors Gotha, stranger! Now move along before I run you through!" );
            func_0156();
         } // end if

      } // end if

   } // end if

   if ( private[3] == 0 ) {

      private[3] = 1;
      say( "You know Gotha don't like us soldier-types to waste time chattin'. Whaddya want?" );
      func_0725();
   } // end if

   if ( private[3] ) {

      say( "You again?  What now?" );
      func_0725();
   } // end if

} // end func

void func_0725() {

   int locals[22];

   locals[1] = 40;
   locals[2] = 41;
   locals[3] = 42;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_077e();
   break;

   case 2:

      func_07fb();
   break;

   case 3:

      func_0147();
   break;

   } // end switch

} // end func

void func_077e() {

   int locals[22];

   say( "Aye, we're the real muscle of the army, Mors Gotha's own guard. Wherever it is we're goin', the locals are gonna be awfully sorry to see us!" );
   locals[1] = 44;
   locals[2] = 45;
   locals[3] = 46;
   locals[4] = 47;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0864();
   break;

   case 2:

      func_0a81();
   break;

   case 3:

      func_0147();
   break;

   case 4:

      func_07ee();
   break;

   } // end switch

} // end func

void func_07ee() {

   say( "You don't know?  Yer either an idiot or an ignoramus! Until you get some sense, you'd better get yer butt outta here!" );
   func_0156();
} // end func

void func_07fb() {

   int locals[22];

   say( "Hey, watch yer tongue, bud! If we look a bit ragged, it's 'cause of the stinkin' rations we're on. They cut us down to two portions of meat-on-a-stick per day! You'd think whoever kept this castle in the air could conjure up more food! But then, what does a soldier know about magic?" );
   locals[1] = 50;
   locals[2] = 51;
   locals[3] = 52;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0864();
   break;

   case 3:

      func_0857();
   break;

   } // end switch

} // end func

void func_0857() {

   say( "That mouth a' yers is gonna get you killed some day. Now get outta here!" );
   func_0156();
} // end func

void func_0864() {

   int locals[47];

   locals[1] = 15;
   locals[2] = 9999;
   if ( x_skills( 2, &locals[2], &locals[1] ) > 12 ) {

      say( "Well, ordinarily that kinda thing is classified, but what the hell! You're a nice guy, you ain't no spy." );
   } else {

      if ( private[4] ) {

         locals[3] = 55;
         print( 1, &locals[3] );
         say( "I gotta tell ya, they've kept us soldiers mostly in the dark on this one, but anyone with half a brain can't help noticin' and hearin' some things." );
      } // end if

      locals[4] = 57;
      locals[5] = 58;
      locals[6] = 0;
      locals[25] = babl_menu( 0, &locals[4] );
      switch ( locals[25] ) {

      case 1:

         func_0926();
      break;

      case 2:

         func_0147();
      } // end if

   } else {

   break;

   } // end switch

   say( "Sorry, but that's classified info, as you should know." );
   locals[26] = 60;
   locals[27] = 62;
   locals[28] = 0;
   locals[47] = babl_menu( 0, &locals[26] );
   switch ( locals[47] ) {

   case 1:

      say( "Thy threats are as hollow as thy head! Be off!" );
      func_0156();
   break;

   case 2:

      func_0147();
   break;

   } // end switch

} // end func

void func_0926() {

   int locals[3];

   locals[1] = random( 1, &locals[2] );
   locals[2] = 9;
   if ( private[2] > 1 ) {

      locals[1] = locals[1] + 2;
   } // end if

   locals[3] = locals[1];
   if ( 1 == locals[3] ) {

      say( "Craziest mission I've seen yet -- we're all fitted out for a siege operation, but here we are inside a castle already, floating a league in the air, over a goddamn desert, with no other castle within 500 miles of here. Sorcery here somewhere, bet your ass." );
   } else {

      if ( 2 == locals[3] ) {

         say( "I hear the Guardian got in somehow and took out all the enemy mages. Nothing like fighting with a Titan on your side, I'll tell ya!" );
      } else {

         if ( 3 == locals[3] ) {

            say( "The defenders are 100% sealed up in there, some kinda blackrock casting. Some guys are sayin' we'll just be goin' in and cleanin' up." );
         } else {

            if ( 4 == locals[3] ) {

               say( "I heard they've found a way in through the basement. We'll be going in as soon as the rest of the troops get here." );
            } else {

               if ( 5 == locals[3] ) {

                  say( "Nothing like workin' under Gotha. Like voodoo, her touch. 'Less yer in the forward units, o'course -- she does like to have a few rookies in front to spring the traps." );
               } else {

                  if ( 6 == locals[3] ) {

                     say( "I hear they hadda herd in a few extra -- whaddayacallem -- brain creatures to hold up the extra weight in the castle." );
                  } else {

                     if ( 7 == locals[3] ) {

                        say( "Mors Gotha's promised us that this invasion's gonna be cake, which means lots of plunder to be had, I'm thinkin'. Hope we'll be allowed to pick our own!" );
                     } else {

                        if ( 8 == locals[3] ) {

                           say( "I heard that they bottled up the enemy inside their fortress, but that they got some sort of hero-type in there with 'em. Still, with Gotha and the Guardian on our side, I ain't worried." );
                        } else {

                           if ( 9 == locals[3] ) {

                              say( "Even with the crack troops we got in here already, we're waitin' on the whole rest of the army! This is gonna be one hell of a siege, I'll tell ya. Can't wait to land this thing and get on with it!" );
                           } else {

                              if ( 10 == locals[3] ) {

                                 say( "I think you should be on yer way, pal." );
                                 func_0147();
                              } else {

                                 if ( 11 == locals[3] ) {

                                    say( "I think you should be on yer way, pal." );
                                    func_0147();
                                 } // end if

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   private[2] = private[2] + 1;
   func_09f6();
} // end func

void func_09f6() {

   int locals[26];

   locals[1] = random( 1, &locals[3] );
   locals[3] = 3;
   locals[4] = locals[1];
   if ( 1 == locals[4] ) {

      locals[2] = 74;
   } else {

      if ( 2 == locals[4] ) {

         locals[2] = 75;
      } else {

         if ( 3 == locals[4] ) {

            locals[2] = 76;
         } // end if

      } // end if

   } // end if

   locals[5] = 77;
   locals[6] = 78;
   locals[7] = 0;
   locals[26] = babl_menu( 0, &locals[5] );
   switch ( locals[26] ) {

   case 1:

      func_0926();
   break;

   case 2:

      func_0147();
   break;

   } // end switch

} // end func

void func_0a81() {

   say( "Sure! Though there ain't much I c'n offer ya, on a soldier's pay." );
   func_035a();
   func_0165();
} // end func

void func_0a90() {

   int locals[29];

   say( "Well, they ain't tellin' us grunts too much, but here's what the grapevine's sayin'." );
   label_0a98:;

   locals[1] = random( 1, &locals[4] );
   locals[4] = 9;
   if ( private[2] > 1 ) {

      locals[1] = locals[1] + 2;
   } // end if

   locals[5] = locals[1];
   if ( 1 == locals[5] ) {

      say( "Craziest mission I've seen yet -- we're all fitted out for a siege operation, but here we are inside a wreck of a castle in the middle of a goddamn desert, with no other castle within 500 miles of here. Sorcery here somewhere, bet your ass." );
   } else {

      if ( 2 == locals[5] ) {

         say( "I hear the Guardian got in somehow and took out all the enemy mages. Nothing like fighting with a Titan on your side, I'll tell ya!" );
      } else {

         if ( 3 == locals[5] ) {

            say( "The defenders are 100% sealed up in there, some kinda blackrock casting. Some guys are sayin' we'll just be goin' in and cleanin' up." );
         } else {

            if ( 4 == locals[5] ) {

               say( "I heard they've found a way in through the basement. We'll be going in as soon as the rest of the troops get here." );
            } else {

               if ( 5 == locals[5] ) {

                  say( "Nothing like workin' under Gotha. Like voodoo, her touch. 'Less yer in the forward units, o'course -- she does like to have a few rookies in front to spring the traps." );
               } else {

                  if ( 6 == locals[5] ) {

                     say( "Somethin' horrible happened here -- corpses everywhere, anyone can see that. Nobody's sayin' what, though." );
                  } else {

                     if ( 7 == locals[5] ) {

                        say( "Mors Gotha's promised us that this invasion's gonna be cake, which means lots of plunder to be had, I'm thinkin'. Hope we'll be allowed to pick our own!" );
                     } else {

                        if ( 8 == locals[5] ) {

                           say( "I heard that they bottled up the enemy inside their fortress, but that they got some sort of hero-type in there with 'em. Still, with Gotha and the Guardian on our side, I ain't worried." );
                        } else {

                           if ( 9 == locals[5] ) {

                              say( "Even with the crack troops we got in here already, we're waitin' on the whole rest of the army! This is gonna be one hell of a siege, I'll tell ya. Wish to hell I knew what we're doin' in the middle of this desert!" );
                           } else {

                              if ( 10 == locals[5] ) {

                                 say( "I think you should be on yer way, pal." );
                                 func_0147();
                              } else {

                                 if ( 11 == locals[5] ) {

                                    say( "I think you should be on yer way, pal." );
                                    func_0147();
                                 } // end if

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   private[2] = private[2] + 1;
   locals[2] = random( 1, &locals[6] );
   locals[6] = 3;
   locals[7] = locals[2];
   if ( 1 == locals[7] ) {

      locals[3] = 92;
   } else {

      if ( 2 == locals[7] ) {

         locals[3] = 93;
      } else {

         if ( 3 == locals[7] ) {

            locals[3] = 94;
         } // end if

      } // end if

   } // end if

   locals[8] = 95;
   locals[9] = 96;
   locals[10] = 0;
   locals[29] = babl_menu( 0, &locals[8] );
   switch ( locals[29] ) {

   case 1:

      goto label_0a98;

   break;

   case 2:

      func_0147();
   break;

   } // end switch

} // end func

void func_0be4() {

   int locals[2];

   locals[2] = 10;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0bfe;

   label_0bfe:;

   return locals[1];
} // end func

conversation #53
string block 0x0e34, name Blackie

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04ff();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_04ff() {

   int locals[88];

   private[2] = get_quest( 1, &locals[1] );
   locals[1] = 18;
   locals[2] = 50;
   if ( get_quest( 1, &locals[2] ) ) {

      func_04d9();
   } // end if

   if ( private[0] == 0 ) {

      say( "Yeah? What is it?" );
      locals[24] = 1;
      locals[3] = 19;
      locals[25] = 1;
      locals[4] = 20;
      locals[26] = 1;
      locals[5] = 21;
      locals[27] = private[2];
      locals[6] = 22;
      locals[7] = 0;
      locals[45] = babl_fmenu( 0, &locals[3], &locals[24] );
      switch ( locals[45] ) {

      case 19:

         func_0651();
      break;

      case 20:

         func_0651();
      break;

      case 21:

         func_0749();
      break;

      case 22:

         func_08a0();
      } // end if

   break;

   } // end switch

   if ( private[0] ) {

      say( "Yeah? What's up?" );
      locals[67] = 1;
      locals[46] = 24;
      locals[68] = 1;
      locals[47] = 25;
      locals[69] = private[2];
      locals[48] = 26;
      locals[70] = 1;
      locals[49] = 27;
      locals[50] = 0;
      locals[88] = babl_fmenu( 0, &locals[46], &locals[67] );
      switch ( locals[88] ) {

      case 24:

         func_08c9();
      break;

      case 25:

         func_0893();
      break;

      case 26:

         func_08a0();
      break;

      case 27:

         func_0801();
      } // end if

   break;

   } // end switch

} // end func

void func_0651() {

   int locals[44];

   say( "Name's Chirl. I keep the stables here." );
   locals[1] = 29;
   locals[2] = 30;
   locals[3] = 31;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_080e();
   break;

   case 3:

      func_06f0();
   break;

   } // end switch

   say( "Hey! That's not funny!" );
   npc_attitude = 1;
   locals[23] = 33;
   locals[24] = 34;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_080e();
   break;

   case 2:

      func_06f0();
   break;

   } // end switch

} // end func

void func_06f0() {

   int locals[23];

   locals[1] = 35;
   print( 1, &locals[1] );
   say( "Do you have any idea what a hairball from a 400-pound cat looks like?" );
   locals[2] = 37;
   locals[3] = 38;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_07a5();
   break;

   case 2:

   break;

   } // end switch

   say( "The Trilks, y'know?" );
   func_0749();
} // end func

void func_0749() {

   int locals[22];

   say( "The Trilks are good for carryin' stuff, 'n' they're smart. Guardian likes us to breed 'em. They say he takes shipments of 'em for himself, dunno why." );
   locals[1] = 41;
   locals[2] = 42;
   locals[3] = 43;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_07a5();
   break;

   case 2:

      func_081b();
   break;

   case 3:

      func_0801();
   break;

   } // end switch

} // end func

void func_07a5() {

   int locals[22];

   say( "The Trilkhai aren't much fun to take care of, that's for sure. Smart, though, fer animals. Always do what you tell'em. Any one of'em could gut you in a second, no trouble, but it's like they don't even know they have claws." );
   locals[1] = 45;
   locals[2] = 46;
   locals[3] = 47;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0749();
   break;

   case 2:

      func_0801();
   break;

   case 3:

      func_081b();
   break;

   } // end switch

} // end func

void func_0801() {

   say( "Yeah, sure." );
   func_0147();
} // end func

void func_080e() {

   say( "Horses? What do you mean? This is where we keep the Trilkhai." );
   func_0749();
} // end func

void func_081b() {

   int locals[43];

   say( "Just animals, y'know. What's the big deal?" );
   locals[22] = 1;
   locals[1] = 51;
   locals[23] = 1;
   locals[2] = 52;
   locals[24] = private[2];
   locals[3] = 53;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 51:

      func_0801();
   break;

   case 52:

      func_0801();
   break;

   case 53:

      func_08a0();
   break;

   } // end switch

} // end func

void func_0893() {

   say( "Wuddoowai look like -- a tour guide? Go ask Mystell if you wanna know something." );
   func_0147();
} // end func

void func_08a0() {

   int locals[2];

   locals[1] = 55;
   print( 1, &locals[1] );
   say( "Wuddayoo, whacked? Giddaddaheeya!" );
   locals[2] = 57;
   print( 1, &locals[2] );
   func_0147();
} // end func

void func_08c9() {

   say( "Well, I reckon I might!" );
   func_035a();
} // end func

conversation #54
string block 0x0e35, name Josie

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_055b();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[47];

   locals[1] = 1;
   print( 1, &locals[1] );
   locals[2] = 18;
   locals[3] = 1;
   set_quest( 2, &locals[3], &locals[2] );
   say( "...@GS8? I... see... in your mind that you can be trusted. That you are not from this world. That you are an... Avatar." );
   locals[4] = 3;
   locals[5] = 4;
   locals[6] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

   break;

   case 2:

      goto label_03c5;

   break;

   } // end switch

   say( "We have need of a... helper. But I see thou dost know nothing of our situation." );
   label_03c5:;

   say( "The humans named us "Trilkhai." They do not know that we are able to communicate in this way." );
   locals[26] = 7;
   locals[27] = 8;
   locals[28] = 0;
   locals[47] = babl_menu( 0, &locals[26] );
   switch ( locals[47] ) {

   case 1:

      func_0408();
   break;

   case 2:

      func_0498();
   break;

   } // end switch

} // end func

void func_0408() {

   int locals[22];

   say( "They might become afraid of us, and destroy us. It is safer that they think of us as animals." );
   locals[1] = 10;
   locals[2] = 11;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0498();
   break;

   case 2:

      func_0450();
   break;

   } // end switch

} // end func

void func_0450() {

   int locals[22];

   say( "Our legends tell of a great war with the humans, in which our race was conquered, and suffered great devastation. None of us would have that happen again." );
   locals[1] = 13;
   locals[2] = 14;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_04e0();
   break;

   case 2:

      func_0498();
   break;

   } // end switch

} // end func

void func_0498() {

   int locals[22];

   say( "I see that thou hast virtues that will prevent thee from betraying us. We must risk this, as many of us have need of a human agent in the keep." );
   locals[1] = 16;
   locals[2] = 17;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_055b();
   break;

   case 2:

      func_0528();
   break;

   } // end switch

} // end func

void func_04e0() {

   int locals[22];

   say( "I know not -- doubtless some trivial vanity. I must ask thee now, wilt thou help us? Quickly, before someone sees thee talking to a cat!" );
   locals[1] = 19;
   locals[2] = 20;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_055b();
   break;

   case 2:

      func_0528();
   break;

   } // end switch

} // end func

void func_0528() {

   say( "Think on it, @GS8. Let thy virtue guide thee in this!" );
   func_0156();
} // end func

void func_0535() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_055b() {

   int locals[137];

   if ( private[0] == 0 ) {

      private[3] = 1;
      private[2] = 0;
   } // end if

   locals[1] = get_quest( 1, &locals[2] );
   locals[2] = 118;
   locals[3] = 50;
   if ( get_quest( 1, &locals[3] ) ) {

      say( "Human! What hast thou done?" );
      func_0110();
   } // end if

   locals[4] = 18;
   if ( get_quest( 1, &locals[4] ) == 0 ) {

      func_035a();
   } // end if

   if ( private[3] ) {

      private[3] = 0;
      private[2] = 0;
      say( "Human, I am the oldest among us here, and I have heard many stories of our race's past, wild tales of Trilkhai who flew among the stars, and hurled fire at the humans. I would learn if thou hast met any being who has knowledge of this." );
      locals[5] = 47;
      locals[6] = 1;
      set_quest( 2, &locals[6], &locals[5] );
      locals[7] = 25;
      locals[8] = 26;
      locals[9] = 27;
      locals[10] = 0;
      locals[28] = babl_menu( 0, &locals[7] );
      switch ( locals[28] ) {

      case 1:

      break;

      case 2:

         func_072b();
      break;

      case 3:

         func_072b();
      break;

      } // end switch

      say( "Hast thou found anyone that can speak of our past?" );
      locals[50] = locals[1];
      locals[29] = 29;
      locals[51] = 1;
      locals[30] = 30;
      locals[31] = 0;
      locals[71] = babl_fmenu( 0, &locals[29], &locals[50] );
      switch ( locals[71] ) {

      case 29:

         func_0738();
      break;

      case 30:

         func_072b();
      } // end if

   break;

   } // end switch

   if ( private[3] == 0 ) {

      if ( private[2] ) {

         say( "Hello again, @GS8." );
         locals[72] = 32;
         locals[73] = 33;
         locals[74] = 0;
         locals[93] = babl_menu( 0, &locals[72] );
         switch ( locals[93] ) {

         case 1:

            func_0758();
         break;

         case 2:

            locals[94] = 3;
            func_0136( &locals[94] );
         } // end if

      } else {

      break;

      } // end switch

      say( "Well, human, Hast thou found anyone that can speak of our past?" );
      locals[116] = locals[1];
      locals[95] = 35;
      locals[117] = 1;
      locals[96] = 36;
      locals[97] = 0;
      locals[137] = babl_fmenu( 0, &locals[95], &locals[116] );
      switch ( locals[137] ) {

      case 35:

         func_0738();
      break;

      case 36:

         func_072b();
      } // end if

   break;

   } // end switch

} // end func

void func_072b() {

   say( "If thou couldst learn the truth, it would be of great service to our race!" );
   func_0147();
} // end func

void func_0738() {

   int locals[1];

   locals[1] = 38;
   print( 1, &locals[1] );
   say( "'Twas all true! Perhaps now I can begin to rally our people." );
   private[2] = 1;
   func_0758();
} // end func

void func_0758() {

   int locals[25];

   if ( private[2] == 0 ) {

      say( "Since thou hast told me a tale, I shall tell thee one." );
   } // end if

   private[2] = 1;
   locals[1] = 1;
   locals[2] = 10001;
   if ( x_clock( 2, &locals[2], &locals[1] ) < 14 ) {

      say( "I have heard in Lord Thibris' thoughts that a woman named Mors Gotha is on her way her, and that soldiers accompany her. He thinks they plan to invade a fortress near here, and yet . . . the desert nomads do not build castles!" );
   } else {

      locals[3] = 117 == 0;
      if ( get_quest( 1, &locals[3] ) ) {

         say( "The spellbook Mors Gotha has brought with her is very important -- I hear her thinking of it often. It contains some spell having to do with...blackrock? I have never heard of such a substance." );
      } else {

         say( "Thou hast angered many people by your defeat of Mors Gotha. They are especially concerned with the disposition of the spellbook she carried. Be warned -- they intend to retrieve it from thee, if they can." );
      } // end if

   } // end if

   locals[4] = 44;
   locals[5] = 45;
   locals[6] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

      func_07eb();
   break;

   case 2:

      func_07f8();
   break;

   } // end switch

} // end func

void func_07eb() {

   say( "Methinks he shall tell thee little. Still, I wish thee success." );
   func_0147();
} // end func

void func_07f8() {

   say( "I hope it helps thee." );
   func_0147();
} // end func

conversation #55
string block 0x0e36, name Beauty

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_055b();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[47];

   locals[1] = 1;
   print( 1, &locals[1] );
   locals[2] = 18;
   locals[3] = 1;
   set_quest( 2, &locals[3], &locals[2] );
   say( "...@GS8? I... see... in your mind that you can be trusted. That you are not from this world. That you are an... Avatar." );
   locals[4] = 3;
   locals[5] = 4;
   locals[6] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

   break;

   case 2:

      goto label_03c5;

   break;

   } // end switch

   say( "We have need of a... helper. But I see thou dost know nothing of our situation." );
   label_03c5:;

   say( "The humans named us "Trilkhai." They do not know that we are able to communicate in this way." );
   locals[26] = 7;
   locals[27] = 8;
   locals[28] = 0;
   locals[47] = babl_menu( 0, &locals[26] );
   switch ( locals[47] ) {

   case 1:

      func_0408();
   break;

   case 2:

      func_0498();
   break;

   } // end switch

} // end func

void func_0408() {

   int locals[22];

   say( "They might become afraid of us, and destroy us. It is safer that they think of us as animals." );
   locals[1] = 10;
   locals[2] = 11;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0498();
   break;

   case 2:

      func_0450();
   break;

   } // end switch

} // end func

void func_0450() {

   int locals[22];

   say( "Our legends tell of a great war with the humans, in which our race was conquered, and suffered great devastation. None of us would have that happen again." );
   locals[1] = 13;
   locals[2] = 14;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_04e0();
   break;

   case 2:

      func_0498();
   break;

   } // end switch

} // end func

void func_0498() {

   int locals[22];

   say( "I see that thou hast virtues that will prevent thee from betraying us. We must risk this, as many of us have need of a human agent in the keep." );
   locals[1] = 16;
   locals[2] = 17;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_055b();
   break;

   case 2:

      func_0528();
   break;

   } // end switch

} // end func

void func_04e0() {

   int locals[22];

   say( "I know not -- doubtless some trivial vanity. I must ask thee now, wilt thou help us? Quickly, before someone sees thee talking to a cat!" );
   locals[1] = 19;
   locals[2] = 20;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_055b();
   break;

   case 2:

      func_0528();
   break;

   } // end switch

} // end func

void func_0528() {

   say( "Think on it, @GS8. Let thy virtue guide thee in this!" );
   func_0156();
} // end func

void func_0535() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_055b() {

   int locals[72];

   if ( private[0] == 0 ) {

      private[3] = 1;
   } // end if

   locals[1] = 50;
   if ( get_quest( 1, &locals[1] ) ) {

      say( "Help! What's happening?" );
      npc_goal = 6;
   } // end if

   private[2] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 24;
   locals[3] = 25;
   locals[4] = 18;
   if ( get_quest( 1, &locals[4] ) == 0 ) {

      locals[5] = 26;
      print( 1, &locals[5] );
      say( "Shhh...! Go to talk to she who they named Blackie!" );
      func_0156();
   } // end if

   if ( private[3] ) {

      private[3] = 0;
      say( "Please, @GS33, I lack for little myself, but wouldst thou bring me some water? I'm very thirsty!" );
      locals[6] = 29;
      locals[7] = 30;
      locals[8] = 31;
      locals[9] = 0;
      locals[27] = babl_menu( 0, &locals[6] );
      switch ( locals[27] ) {

      case 1:

      break;

      case 2:

         func_06c8();
      break;

      case 3:

         func_06de();
      break;

      } // end switch

      say( "Please, I'd really like some!" );
      func_06eb();
   } // end if

   locals[28] = 61;
   if ( get_quest( 1, &locals[28] ) ) {

      say( "Hi there! Thanks for the water, I'm not thirsty any more." );
      locals[29] = 34;
      locals[30] = 0;
      locals[50] = babl_menu( 0, &locals[29] );
      if ( locals[50] == 1 ) {

         func_0820();
      } // end if

   } // end if

   if ( private[3] == 0 ) {

      say( "Hast thou brought me water?" );
      locals[51] = 36;
      locals[52] = 37;
      locals[53] = 38;
      locals[54] = 0;
      locals[72] = babl_menu( 0, &locals[51] );
      switch ( locals[72] ) {

      case 1:

         func_06c8();
      break;

      case 2:

         func_06de();
      break;

      case 3:

      break;

      } // end switch

      say( "Oh, thank thee!" );
      func_06eb();
   } // end if

} // end func

void func_06c8() {

   int locals[1];

   say( "Please hurry back!" );
   locals[1] = 3;
   func_0136( &locals[1] );
} // end func

void func_06de() {

   say( "Thou art a mean person!" );
   func_0156();
} // end func

void func_06eb() {

   int locals[29];

   label_06f0:;

   locals[1] = find_barter( 1, &locals[2] );
   locals[2] = 188;
   if ( locals[1] ) {

      locals[3] = 1;
      give_ptr_npc( 2, &locals[3], &locals[1] );
      locals[4] = 317;
      do_inv_create( 1, &locals[4] );
      locals[5] = 317;
      take_from_npc( 1, &locals[5] );
      say( "I thank thee, @GS8!" );
      locals[6] = 61;
      locals[7] = 1;
      set_quest( 2, &locals[7], &locals[6] );
      func_0795();
   } else {

      say( "But where is it?" );
   } // end if

   locals[8] = 44;
   locals[9] = 45;
   locals[10] = 0;
   locals[29] = babl_menu( 0, &locals[8] );
   switch ( locals[29] ) {

   case 1:

      goto label_06f0;

   break;

   case 2:

      func_06c8();
   break;

   } // end switch

} // end func

void func_0795() {

   int locals[25];

   locals[1] = 19;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 123;
   if ( get_quest( 1, &locals[3] ) ) {

      say( "Oh! I was going to tell thee that Relk doesn't like thee, but I guess thou... thou didst kill him. Never mind." );
      func_0165();
   } else {

      say( "Now I must tell you something. I heard Relk thinking about thee! He doesn't like thee at all, and he made some kind of trap to catch thee in, if you go to look for a black jewel he put in the oubliette! I don't understand what it means, but thou shouldst stay away from him!" );
      locals[4] = 48;
      locals[5] = 49;
      locals[6] = 50;
      locals[7] = 0;
      locals[25] = babl_menu( 0, &locals[4] );
      switch ( locals[25] ) {

      case 1:

         func_0820();
      break;

      case 2:

         func_0820();
      break;

      case 3:

         func_0820();
      } // end if

   break;

   } // end switch

} // end func

void func_0820() {

   say( "Please be careful!" );
   func_0156();
} // end func

conversation #56
string block 0x0e37, name Aron

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_055b();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[47];

   locals[1] = 1;
   print( 1, &locals[1] );
   locals[2] = 18;
   locals[3] = 1;
   set_quest( 2, &locals[3], &locals[2] );
   say( "...@GS8? I... see... in your mind that you can be trusted. That you are not from this world. That you are an... Avatar." );
   locals[4] = 3;
   locals[5] = 4;
   locals[6] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

   break;

   case 2:

      goto label_03c5;

   break;

   } // end switch

   say( "We have need of a... helper. But I see thou dost know nothing of our situation." );
   label_03c5:;

   say( "The humans named us "Trilkhai." They do not know that we are able to communicate in this way." );
   locals[26] = 7;
   locals[27] = 8;
   locals[28] = 0;
   locals[47] = babl_menu( 0, &locals[26] );
   switch ( locals[47] ) {

   case 1:

      func_0408();
   break;

   case 2:

      func_0498();
   break;

   } // end switch

} // end func

void func_0408() {

   int locals[22];

   say( "They might become afraid of us, and destroy us. It is safer that they think of us as animals." );
   locals[1] = 10;
   locals[2] = 11;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0498();
   break;

   case 2:

      func_0450();
   break;

   } // end switch

} // end func

void func_0450() {

   int locals[22];

   say( "Our legends tell of a great war with the humans, in which our race was conquered, and suffered great devastation. None of us would have that happen again." );
   locals[1] = 13;
   locals[2] = 14;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_04e0();
   break;

   case 2:

      func_0498();
   break;

   } // end switch

} // end func

void func_0498() {

   int locals[22];

   say( "I see that thou hast virtues that will prevent thee from betraying us. We must risk this, as many of us have need of a human agent in the keep." );
   locals[1] = 16;
   locals[2] = 17;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_055b();
   break;

   case 2:

      func_0528();
   break;

   } // end switch

} // end func

void func_04e0() {

   int locals[22];

   say( "I know not -- doubtless some trivial vanity. I must ask thee now, wilt thou help us? Quickly, before someone sees thee talking to a cat!" );
   locals[1] = 19;
   locals[2] = 20;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_055b();
   break;

   case 2:

      func_0528();
   break;

   } // end switch

} // end func

void func_0528() {

   say( "Think on it, @GS8. Let thy virtue guide thee in this!" );
   func_0156();
} // end func

void func_0535() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_055b() {

   int locals[5];

   locals[2] = 50;
   if ( get_quest( 1, &locals[2] ) ) {

      say( "Human! What hast thou done?" );
      func_0110();
   } // end if

   locals[3] = 18;
   if ( get_quest( 1, &locals[3] ) == 0 ) {

      locals[4] = 24;
      print( 1, &locals[4] );
      say( "Shhh! Speak to the one they named Blackie!" );
      func_0147();
   } // end if

   locals[5] = 61;
   if ( get_quest( 1, &locals[5] ) ) {

      say( "Thank you! Josie's much happier now. Go in peace, Avatar." );
      func_0147();
   } // end if

   say( "For myself, I have nothing to ask of thee. Please see to my fellows -- she that they have named Josie is very thirsty." );
   func_0147();
} // end func

conversation #57
string block 0x0e38, name Bishay

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05b9();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_0593() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_05b9() {

   int locals[46];

   locals[1] = 50;
   if ( get_quest( 1, &locals[1] ) ) {

      func_0593();
   } // end if

   if ( private[0] ) {

      say( "Ah, 'tis good to see a familiar face! Would you care to make a purchase, my good friend?" );
      locals[2] = 19;
      locals[3] = 20;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         func_0764();
      break;

      case 2:

         func_07ac();
      } // end if

   break;

   } // end switch

   locals[24] = 2;
   func_04d9( &locals[24] );
   say( "Greetings, friend! I bid thee welcome to glorious Killorn Keep, the castle which soars among the clouds.  Thou dost seem to be a well-worn traveller -- I would wager that thou hast been off on adventures of late." );
   locals[25] = 22;
   locals[26] = 23;
   locals[27] = 24;
   locals[28] = 0;
   locals[46] = babl_menu( 0, &locals[25] );
   switch ( locals[46] ) {

   case 1:

      func_0678();
   break;

   case 2:

      func_0678();
   break;

   case 3:

      func_06c0();
   break;

   } // end switch

} // end func

void func_0678() {

   int locals[22];

   say( "Thou hast come to the right place then, friend. Thou will be a happier soul for having found me! Here thou may purchase many items, items which could tip the scales of success on your quest. Might thou be interested?" );
   locals[1] = 26;
   locals[2] = 27;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0708();
   break;

   case 2:

      func_07ac();
   break;

   } // end switch

} // end func

void func_06c0() {

   int locals[22];

   say( "Well, no matter. Thou still will not be sorry to have visited Aron, merchant-extraordinaire! I have for sale here a great variety of items, to benefit both the quiet traveller and the bold adventurer.  Art thou interested?" );
   locals[1] = 29;
   locals[2] = 30;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0708();
   break;

   case 2:

      func_07ac();
   break;

   } // end switch

} // end func

void func_0708() {

   int locals[22];

   say( "Thou shouldst know, my good friend, that my stock has been painstakingly gathered from all corners of the world, so that I may better serve such deserving customers as thyself. Aron the merchant does not disappoint!" );
   locals[1] = 32;
   locals[2] = 33;
   locals[3] = 34;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0764();
   break;

   case 2:

      func_0764();
   break;

   case 3:

      func_07ac();
   break;

   } // end switch

} // end func

void func_0764() {

   int locals[22];

   say( "My stock includes hand-crafted arms and armaments, delicious foodstuffs, and provisions of the highest quality. I can even offer you items of a magical nature, shouldst thou have a full enough purse.  Wouldst thou care to make a purchase?" );
   locals[1] = 36;
   locals[2] = 37;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_035a();
   break;

   case 2:

      func_07ac();
   break;

   } // end switch

} // end func

void func_07ac() {

   say( "Come back soon, my most excellent friend! Thou shall not find better service anywhere!" );
   func_0147();
} // end func

conversation #58
string block 0x0e39, name 

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04ff();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_04ff() {

   int locals[45];

   locals[1] = 50;
   if ( get_quest( 1, &locals[1] ) ) {

      func_04d9();
   } // end if

   if ( private[0] ) {

      say( "So thou hast come back, huh? What dost thou want this time?" );
      locals[2] = 19;
      locals[3] = 20;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         func_066b();
      break;

      case 2:

         func_0156();
      } // end if

   break;

   } // end switch

   say( "Oh, how grand! Another rotten customer! I suppose you'll be wanting to buy one of my valuable pieces of merchandise, right?" );
   locals[24] = 22;
   locals[25] = 23;
   locals[26] = 24;
   locals[27] = 0;
   locals[45] = babl_menu( 0, &locals[24] );
   switch ( locals[45] ) {

   case 1:

      func_05b3();
   break;

   case 2:

      func_0711();
   break;

   case 3:

      func_060f();
   break;

   } // end switch

} // end func

void func_05b3() {

   int locals[22];

   say( "No, I am Mors Gotha's mother. Cretin!  Of course I am a merchant!  Art thou blind, or dost thou have the brain of a sponge?" );
   locals[1] = 26;
   locals[2] = 27;
   locals[3] = 28;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0711();
   break;

   case 2:

      func_060f();
   break;

   case 3:

      func_060f();
   break;

   } // end switch

} // end func

void func_060f() {

   int locals[22];

   say( "I suppose thou dost think I enjoy this stinking job! My grandfather was a merchant here in the Keep, as was my father after him. I was all but forced into this vile profession, selling all manner of junk to persons like yourself." );
   locals[1] = 30;
   locals[2] = 31;
   locals[3] = 32;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_066b();
   break;

   case 2:

      func_072b();
   break;

   case 3:

      func_071e();
   break;

   } // end switch

} // end func

void func_066b() {

   int locals[22];

   say( "I've got some food, I think, though 'tis moldy, likely as not. I've some weapons from my father's old stock, and maybe some armor, though I cannot vouch for the quality.  I may even have some magical items -- to be honest, it has been long since I have taken a proper inventory." );
   locals[1] = 34;
   locals[2] = 35;
   locals[3] = 36;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_071e();
   break;

   case 2:

      func_0711();
   break;

   case 3:

      func_06c7();
   break;

   } // end switch

} // end func

void func_06c7() {

   int locals[22];

   say( "Well, if thou dost insist, I suppose we can barter. Are you sure this is your desire?" );
   locals[1] = 38;
   locals[2] = 39;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_035a();
   break;

   case 2:

      func_0711();
   break;

   } // end switch

   func_0165();
} // end func

void func_0711() {

   say( "Begone then. I did not ask for thy company in the first place!" );
   func_0156();
} // end func

void func_071e() {

   say( "Think thee that I have any interest in thy worthless opinions? Get thee from my sight!" );
   func_0156();
} // end func

void func_072b() {

   int locals[22];

   say( "That makes two of us. Thou hast no interest in my wares, dost thou?" );
   locals[1] = 43;
   locals[2] = 44;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0711();
   break;

   case 2:

      func_06c7();
   break;

   } // end switch

} // end func

could not load code ...
conversation #60
string block 0x0e3b, name guard

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0380();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_0380() {

   int locals[3];

   locals[1] = 50;
   if ( get_quest( 1, &locals[1] ) ) {

      say( "Human! What hast thou done?" );
      func_0110();
   } // end if

   locals[2] = 18;
   locals[3] = 1;
   if ( get_quest( 2, &locals[3], &locals[2] ) ) {

      say( "Hssst! Do not speak to us here, lest you call attention to us. Speak to us only in the stables. Chirl is too dimwitted to suspect anything." );
   } else {

      say( "Human! Do not speak to us here! Come to the stables, and speak to the one they call Blackie." );
   } // end if

   func_0147();
} // end func

could not find string block 0x0e3d.
could not find string block 0x0e3e.
could not load code ...
conversation #64
string block 0x0e3f, name 

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   say( "Deep within the bowels of the Ethereal Void, goblin captain A. I. Crunchowicz awakens. He has only a shortsword and a leather helmet. In his future lie glorious deeds, or a bloody and ignominious death!" );
   func_0110();
} // end func

could not find string block 0x0e41.
could not find string block 0x0e42.
could not find string block 0x0e43.
could not find string block 0x0e44.
could not find string block 0x0e45.
could not find string block 0x0e46.
could not find string block 0x0e47.
could not load code ...
conversation #73
string block 0x0e48, name Beatrice

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[166];

   private[2] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 1;
   locals[3] = 2;
   private[3] = sex( 2, &locals[5], &locals[4] );
   locals[4] = 3;
   locals[5] = 4;
   locals[1] = get_quest( 1, &locals[6] );
   locals[6] = 48;
   if ( private[0] == 0 ) {

      locals[7] = 20;
      locals[8] = 1;
      set_quest( 2, &locals[8], &locals[7] );
      private[6] = 1;
      private[4] = 0;
      private[16] = 0;
      private[5] = 0;
      say( "Hm? A @GS33? But of course @GS34's not real, thank the gods for that!" );
      locals[9] = 6;
      locals[10] = 7;
      locals[11] = 8;
      locals[12] = 0;
      locals[30] = babl_menu( 0, &locals[9] );
      switch ( locals[30] ) {

      case 1:

         func_06d1();
      break;

      case 2:

         func_0689();
      break;

      case 3:

         func_0689();
      } // end if

   break;

   } // end switch

   if ( private[5] ) {

      locals[31] = 9;
      print( 1, &locals[31] );
      say( "'Tis good to see thee again! My hunting is going well! I have pushed the yeti back into their own section of the caves again!" );
      locals[32] = 500;
      x_exp( 1, &locals[32] );
      locals[33] = 11;
      locals[34] = 12;
      locals[35] = 0;
      locals[54] = babl_menu( 0, &locals[33] );
      switch ( locals[54] ) {

      case 1:

         func_0d20();
      break;

      case 2:

         func_0d48();
      } // end if

   break;

   } // end switch

   if ( private[4] ) {

      locals[55] = 13;
      print( 1, &locals[55] );
      say( "I see a pyramid. I race up and down it, until every block becomes the same color, the color of a place I have seen.  At length, I find it becomes a new color..." );
      locals[56] = 15;
      print( 1, &locals[56] );
      func_0147();
   } // end if

   if ( private[6] == 2 ) {

      if ( func_018b( 41, 38 ) == 1 ) {

         say( "Oh, it's you again. Hello." );
         locals[57] = 17;
         locals[58] = 18;
         locals[59] = 19;
         locals[60] = 0;
         locals[78] = babl_menu( 0, &locals[57] );
         switch ( locals[78] ) {

         case 1:

            func_0c36();
         break;

         case 2:

            func_0c36();
         break;

         case 3:

            func_0c9f();
         } // end if

      break;

      } // end switch

      say( "Goddamn you, give me the drug!" );
      locals[79] = 21;
      locals[80] = 22;
      locals[81] = 23;
      locals[82] = 0;
      locals[100] = babl_menu( 0, &locals[79] );
      switch ( locals[100] ) {

      case 1:

         func_0b6a();
      break;

      case 2:

         func_0b42();
      break;

      case 3:

         func_0b42();
      } // end if

   break;

   } // end switch

   if ( private[0] ) {

      say( "The @GS33 again! Will this never end?" );
      locals[122] = 1;
      locals[101] = 25;
      locals[123] = 1;
      locals[102] = 26;
      locals[124] = locals[1];
      locals[103] = 27;
      locals[125] = 1;
      locals[104] = 28;
      locals[105] = 0;
      locals[143] = babl_fmenu( 0, &locals[101], &locals[122] );
      switch ( locals[143] ) {

      case 25:

         func_0a37();
      break;

      case 26:

         func_0741();
      break;

      case 27:

      break;

      case 28:

         func_0b35();
      break;

      } // end switch

      if ( private[6] == 1 ) {

         locals[144] = 29;
         print( 1, &locals[144] );
         private[6] = 2;
      } // end if

      say( "Where is the drug? I must have it! I can't live without it!" );
      locals[145] = 31;
      locals[146] = 32;
      locals[147] = 33;
      locals[148] = 0;
      locals[166] = babl_menu( 0, &locals[145] );
      switch ( locals[166] ) {

      case 1:

         func_0b6a();
      break;

      case 2:

         func_0b5d();
      break;

      case 3:

      break;

      } // end switch

      func_016f( 38 );
      private[10][1] = 2;
      private[10][2] = 0;
      func_0b42();
   } // end if

} // end func

void func_0689() {

   int locals[22];

   say( "I am Mokpo the Mad, as if that mattered, for thou art just another shade, another pointless vision." );
   locals[1] = 35;
   locals[2] = 36;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_06d1();
   break;

   case 2:

      func_07e5();
   break;

   } // end switch

} // end func

void func_06d1() {

   int locals[22];

   say( "Real? You? This world, this travesty of stone and ice, dirt and cold water? This mock-up, peopled with brutal apes? Don't make me laugh!" );
   locals[1] = 38;
   locals[2] = 39;
   locals[3] = 40;
   locals[4] = 41;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0937();
   break;

   case 2:

      func_07e5();
   break;

   case 3:

      func_0890();
   break;

   case 4:

      func_0741();
   break;

   } // end switch

} // end func

void func_0741() {

   int locals[22];

   say( "The only warm creatures in all this darkness. I slew one once, caught it sleeping. The meat fed me a month, its fur warmed me 'til I lost it in a cave-in. It matters not, 'tis all illusion." );
   locals[1] = 43;
   locals[2] = 44;
   locals[3] = 45;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_079d();
   break;

   case 2:

      func_07e5();
   break;

   case 3:

      func_08ec();
   break;

   } // end switch

} // end func

void func_079d() {

   int locals[22];

   say( "Something's stirred them up of late -- doubtless they've found some new bauble to fight each other for. Fools, to believe there is anything of value here!" );
   locals[1] = 47;
   locals[2] = 48;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0890();
   break;

   case 2:

      func_08ec();
   break;

   } // end switch

} // end func

void func_07e5() {

   int locals[22];

   say( "As if I needed a reason! But I have proof, if you want it -- this solid-seeming stone is all a facade -- a mere flip of a lever, touch of a button, it changes, morphs, vanishes! Look in the maze, and thou shalt see!" );
   locals[1] = 50;
   locals[2] = 51;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_083a();
   break;

   case 2:

      func_082d();
   break;

   } // end switch

} // end func

void func_082d() {

   say( "Believe? Believe nothing that thou canst see here!" );
   func_0937();
} // end func

void func_083a() {

   int locals[23];

   locals[1] = 53;
   print( 1, &locals[1] );
   say( "Simpleton! It's ALL maze in this shadow-world. A toy maze of sharp stones and vicious monkeys, for some mad child-god's amusement." );
   locals[2] = 55;
   locals[3] = 56;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0937();
   break;

   case 2:

      func_0aed();
   break;

   } // end switch

} // end func

void func_0890() {

   int locals[22];

   say( "Not so bad? The nights I've spent here, shivering on the damp, fearing every minute to see that flash of white, the yeti running in the darkness. If I thought that were real, well..." );
   locals[1] = 58;
   locals[2] = 59;
   locals[3] = 60;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0937();
   break;

   case 2:

      func_0741();
   break;

   case 3:

      func_0937();
   break;

   } // end switch

} // end func

void func_08ec() {

   int locals[22];

   say( "Ever since I came here I've been seeing it, a few minutes, a few hours at a time... I've seen what is real!" );
   locals[1] = 62;
   locals[2] = 63;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0937();
   break;

   case 2:

   break;

   } // end switch

   say( "No, it is thou who art mistaken!" );
   func_0937();
} // end func

void func_0937() {

   int locals[22];

   say( "I can see what's real! If you could see it... shining colors, fabulous beasts, vast plains of light, great pillars reaching up into the blackness. It's so wonderful -- nothing could be more real!" );
   locals[1] = 66;
   locals[2] = 67;
   locals[3] = 68;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0993();
   break;

   case 2:

      func_0a37();
   break;

   case 3:

      func_0aed();
   break;

   } // end switch

} // end func

void func_0993() {

   int locals[22];

   say( "It never stays! Five minutes, an hour, three hours I wander there, then I return here, banished from the true world! Exiled to this... tawdry illusion. Of late the visions have become ever shorter, ever rarer. 'Tis bitter!" );
   locals[1] = 70;
   locals[2] = 71;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a37();
   break;

   case 2:

      func_09db();
   break;

   } // end switch

} // end func

void func_09db() {

   int locals[22];

   say( "Why bother, when the real world is so close at hand? Why play games in this illusory hell! 'Tis not worth it! I could build a fire, but the yeti would see it and kill me. 'Tis nothing but peril and frustration!" );
   locals[1] = 73;
   locals[2] = 74;
   locals[3] = 75;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0aed();
   break;

   case 2:

      func_0741();
   break;

   case 3:

      func_0a37();
   break;

   } // end switch

} // end func

void func_0a37() {

   int locals[24];

   locals[1] = 76;
   print( 1, &locals[1] );
   if ( private[16] == 0 ) {

      say( "I see it before me now! An endless walkway glowing blue! I leap, and am thrown high into the air... the scene fades... now a golden maze... I scramble up on top of the walls. Now I see the goal...!" );
   } // end if

   if ( private[16] == 1 ) {

      say( "Fire! A glorious, infernal city, fountains spraying blood, winged demons swoop, I battle through them, and win a deadly sceptre..." );
      say( "It fades, and I return here. 'Tis ever thus." );
   } // end if

   if ( private[16] >= 2 ) {

      locals[2] = 80;
      print( 1, &locals[2] );
      say( "I cannot achieve the vision right now." );
   } // end if

   private[16] = private[16] + 1;
   locals[3] = 82;
   locals[4] = 83;
   locals[5] = 84;
   locals[6] = 85;
   locals[7] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      func_0b35();
   break;

   case 2:

      func_0aed();
   break;

   case 3:

      func_09db();
   break;

   case 4:

      func_0993();
   break;

   } // end switch

} // end func

void func_0aed() {

   int locals[22];

   say( "Bah! Why do I waste my words on a shadow? 'Tis pointless." );
   locals[1] = 87;
   locals[2] = 88;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_0147();
   break;

   } // end switch

} // end func

void func_0b35() {

   say( "Fare thee well... that is, if such formalities can mean aught to a shadow!" );
   func_0147();
} // end func

void func_0b42() {

   int locals[1];

   say( "NO! NO! I must have it!" );
   locals[1] = 91;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0b5d() {

   say( "Bah! 'Tis probably a lie anyway!" );
   func_0147();
} // end func

void func_0b6a() {

   int locals[25];

   locals[1] = find_barter( 1, &locals[2] );
   locals[2] = 276;
   if ( locals[1] ) {

      locals[3] = 1;
      give_ptr_npc( 2, &locals[3], &locals[1] );
      func_0bf2();
   } else {

      say( "Please, I must have it!" );
      locals[4] = 94;
      locals[5] = 95;
      locals[6] = 96;
      locals[7] = 0;
      locals[25] = babl_menu( 0, &locals[4] );
      switch ( locals[25] ) {

      case 1:

         func_0b6a();
      break;

      case 2:

         func_0b5d();
      break;

      case 3:

         func_0b42();
      } // end if

   break;

   } // end switch

} // end func

void func_0bf2() {

   int locals[3];

   locals[1] = 97;
   print( 1, &locals[1] );
   say( "A violet world, I make an enormous leap, now another, now I am sliding, some sort of ramp... AAAHHHH!! 'Tis him! No escape, I must...!" );
   locals[2] = 99;
   print( 1, &locals[2] );
   say( "Now I am in an old place...very old." );
   locals[3] = 101;
   print( 1, &locals[3] );
   npc_goal = 7;
   private[4] = 1;
   func_0147();
} // end func

void func_0c36() {

   int locals[22];

   say( "I... I... I don't think so. I've... become interested in something I'm... doing in... this world." );
   locals[1] = 103;
   locals[2] = 104;
   locals[3] = 105;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0d2d();
   break;

   case 2:

      func_0c9f();
   break;

   case 3:

      func_0c92();
   break;

   } // end switch

} // end func

void func_0c92() {

   say( "He stares at you in disgust." );
   func_0156();
} // end func

void func_0c9f() {

   int locals[22];

   say( "I've begun h-hunting the yeti! It turns out, with a little... ingenuity they can be killed easily. It makes my life here... easier." );
   private[5] = 1;
   locals[1] = 108;
   locals[2] = 109;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0cec();
   break;

   case 2:

      func_0d20();
   break;

   } // end switch

} // end func

void func_0cec() {

   int locals[22];

   say( "It is... difficult to say, at this point. It may be a bit more... interesting than I had previously thought. I am not prepared to say more than that, at this point." );
   locals[1] = 111;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

      func_0d20();
   } // end if

} // end func

void func_0d20() {

   say( "Farewell, Avatar." );
   func_0147();
} // end func

void func_0d2d() {

   int locals[1];

   locals[1] = 113;
   print( 1, &locals[1] );
   say( "Well... no, thou'rt right! What was I thinking! I must return to the real world at once. Please, give me the drug!" );
   func_0b6a();
} // end func

void func_0d48() {

   int locals[23];

   locals[1] = 115;
   print( 1, &locals[1] );
   say( "My visions have ceased utterly, I'm afraid. Whatever mystic talent I had has disappeared. 'Tis fortunate I now have my hunting to distract me. I suppose I'd better get to work on it again." );
   locals[2] = 117;
   locals[3] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   if ( locals[23] == 1 ) {

      func_0d20();
   } // end if

} // end func

conversation #74
string block 0x0e49, name Sentinel 868

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[115];

   npc_goal = 8;
   private[2] = sex( 2, &locals[4], &locals[3] );
   locals[3] = 1;
   locals[4] = 2;
   locals[2] = get_quest( 1, &locals[5] );
   locals[5] = 128;
   if ( locals[2] % 8 >= 4 ) {

      say( "Avatar, I thank thee! I feel the Guardian's influence leaving this place -- it is no longer sacred to him! And so, I too may leave; I need no longer watch over my city, as I thought I might do for all eternity. You have brought me peace, Avatar." );
      remove_talker( 0 );
      func_0147();
   } // end if

   if ( private[0] == 0 ) {

      locals[1] = 0;
      private[3] = 0;
      private[9] = 0;
      private[8] = 0;
      private[5] = 1;
      private[6] = 1;
      private[7] = 1;
      locals[6] = 4;
      print( 1, &locals[6] );
      say( "Who art thou? A living @GS33? What brought thee to this place?" );
      locals[7] = 6;
      locals[8] = 7;
      locals[9] = 8;
      locals[10] = 9;
      locals[11] = 0;
      locals[28] = babl_menu( 0, &locals[7] );
      switch ( locals[28] ) {

      case 1:

         func_0572();
      break;

      case 2:

         func_062a();
      break;

      case 3:

         func_05ce();
      break;

      case 4:

         func_0750();
      } // end if

   break;

   } // end switch

   if ( private[3] ) {

      say( "Greetings! Hast thou taken a liking to our fair city?" );
      if ( private[4] == 1 ) {

         locals[29] = 12;
         if ( get_quest( 1, &locals[29] ) ) {

            locals[1] = 1;
         } // end if

      } // end if

      locals[51] = 1;
      locals[30] = 11;
      locals[52] = locals[1];
      locals[31] = 12;
      locals[53] = 1;
      locals[32] = 13;
      locals[33] = 0;
      locals[72] = babl_fmenu( 0, &locals[30], &locals[51] );
      switch ( locals[72] ) {

      case 11:

         func_083d();
      break;

      case 12:

         func_0b94();
      break;

      case 13:

      break;

      } // end switch

      say( "Our greatest asset was our supply of filanium." );
      func_0a23();
   } // end if

   if ( private[0] ) {

      say( "Greetings, again. What may I do for thee?" );
      locals[94] = 1;
      locals[73] = 16;
      locals[95] = private[5];
      locals[74] = 17;
      locals[96] = private[6];
      locals[75] = 18;
      locals[97] = 1;
      locals[76] = 19;
      locals[77] = 0;
      locals[115] = babl_fmenu( 0, &locals[73], &locals[94] );
      switch ( locals[115] ) {

      case 16:

         func_07e8();
      break;

      case 17:

         func_06ef();
      break;

      case 18:

         func_0750();
      break;

      case 19:

         func_0572();
      } // end if

   break;

   } // end switch

} // end func

void func_0572() {

   int locals[22];

   say( "Remain as long as you like. I shall not bar thy way." );
   locals[1] = 21;
   locals[2] = 22;
   locals[3] = 23;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0147();
   break;

   case 2:

      func_06ef();
   break;

   case 3:

      func_0750();
   break;

   } // end switch

} // end func

void func_05ce() {

   int locals[22];

   say( "Then I pity thee, for surely thou art lost." );
   locals[1] = 25;
   locals[2] = 26;
   locals[3] = 27;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_068b();
   break;

   case 2:

      func_08b1();
   break;

   case 3:

      func_0572();
   break;

   } // end switch

} // end func

void func_062a() {

   int locals[22];

   private[7] = 0;
   say( "Then I wish thee better luck than I had, for 'tis a fight I lost long ago. Perhaps thou art a wiser @GS33 than I was." );
   locals[1] = 29;
   locals[2] = 30;
   locals[3] = 31;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_07e8();
   break;

   case 2:

      func_0750();
   break;

   case 3:

      func_0572();
   break;

   } // end switch

} // end func

void func_068b() {

   int locals[22];

   private[7] = 0;
   say( "Thou didst battle the Guardian, and won? 'Tis impossible." );
   locals[1] = 33;
   locals[2] = 34;
   locals[3] = 35;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_08b1();
   break;

   case 3:

      func_07e8();
   break;

   } // end switch

   say( "Perhaps thou art right." );
   func_083d();
} // end func

void func_06ef() {

   int locals[22];

   private[5] = 0;
   say( "This was once the city of Anodunos." );
   locals[1] = 38;
   locals[2] = 39;
   locals[3] = 40;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_07e8();
   break;

   case 2:

      func_0750();
   break;

   case 3:

      func_07bf();
   break;

   } // end switch

} // end func

void func_0750() {

   int locals[23];

   private[6] = 0;
   say( "I am Beatrice. When there was a city here, I ruled it." );
   locals[1] = 42;
   locals[2] = 43;
   locals[3] = 45;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_07e8();
   break;

   case 2:

      locals[23] = 44;
      print( 1, &locals[23] );
      func_08b1();
   break;

   case 3:

      func_09db();
   break;

   } // end switch

} // end func

void func_07bf() {

   int locals[2];

   locals[1] = 46;
   print( 1, &locals[1] );
   say( "Aye, I suppose thou art right." );
   locals[2] = 48;
   print( 1, &locals[2] );
   func_0147();
} // end func

void func_07e8() {

   int locals[22];

   say( "'Tis an ancient story, and a long one. Surely thou art not interested." );
   locals[1] = 50;
   locals[2] = 51;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_083d();
   break;

   case 2:

      func_0830();
   break;

   } // end switch

} // end func

void func_0830() {

   say( "Fare thee well." );
   func_0147();
} // end func

void func_083d() {

   int locals[22];

   say( "Anodunos was once a great city-state, a trading center of the southern continent, famed for its rich filanium deposits. We were losing a war with the northern city-states, and our sorcerers sought aid from the being called the Guardian." );
   locals[1] = 54;
   locals[2] = 56;
   locals[3] = 57;
   locals[4] = 58;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      say( "So we learned." );
      func_08b1();
   break;

   case 2:

   break;

   case 3:

   break;

   case 4:

      func_0a23();
   break;

   } // end switch

   say( "Thou shalt learn." );
   func_08b1();
} // end func

void func_08b1() {

   int locals[22];

   private[3] = 1;
   say( "He won our war for us -- made us lords of this world for a time. But he demanded things in return -- first supplies, then weapons, finally soldiers and slaves. Too late, we understood the nature of our ally." );
   locals[1] = 61;
   locals[2] = 62;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08fe();
   break;

   case 2:

      func_08fe();
   break;

   } // end switch

} // end func

void func_08fe() {

   int locals[22];

   say( "Eventually we refused his demands, but by that time we had helped him gain too much power on our world. He crushed our nation utterly, as you may see." );
   locals[1] = 64;
   locals[2] = 65;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0946();
   break;

   case 2:

      func_098e();
   break;

   } // end switch

} // end func

void func_0946() {

   int locals[22];

   say( "Take care thou dost not repeat it." );
   locals[1] = 67;
   locals[2] = 68;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0830();
   break;

   case 2:

      func_098e();
   break;

   } // end switch

} // end func

void func_098e() {

   int locals[22];

   say( "I still remember the day the city fell; at midday the fountain in the town square froze in an instant. We all stared. The next minute we felt the cold air flowing outwards; eventually, the entire continent had frozen under." );
   private[9] = 1;
   locals[1] = 70;
   locals[2] = 71;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_09db();
   break;

   case 2:

      func_0830();
   break;

   } // end switch

} // end func

void func_09db() {

   int locals[22];

   say( "After the city fell, I... remained, somehow, nursing the last city-dwellers into death, as the glaciers came, then the yeti. Since that time I have wandered the cold and silent streets. I know not how long it has been." );
   locals[1] = 73;
   locals[2] = 74;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0ab8();
   break;

   case 2:

      func_0946();
   break;

   } // end switch

} // end func

void func_0a23() {

   int locals[22];

   say( "Filanium is a rare mineral used in many medical and alchemical preparations. The mud in this area is particularly rich in it -- many bathed there, believing it a health measure." );
   locals[1] = 76;
   locals[2] = 77;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08b1();
   break;

   case 2:

      func_0a6b();
   break;

   } // end switch

} // end func

void func_0a6b() {

   int locals[22];

   say( "'Tis far, far to the southeast of here, on the other side of the river, across what was once a smooth lake -- but beware the yeti who have made their home there." );
   private[8] = 1;
   locals[1] = 79;
   locals[2] = 80;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08b1();
   break;

   case 2:

      func_0830();
   break;

   } // end switch

} // end func

void func_0ab8() {

   int locals[22];

   private[4] = 1;
   say( "Ever since the city fell, I have had a feeling of the Guardian's presence here -- as if he were somehow feeding, drawing some sort of sustenance from the power of the city. It maddens me to think of it." );
   locals[1] = 82;
   locals[2] = 83;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b1b();
   break;

   case 2:

      func_0b05();
   break;

   } // end switch

} // end func

void func_0b05() {

   int locals[1];

   say( "I thank thee -- 'tis a long time since I met with any kindness in this place. Perhaps if the Guardian were banished from this place, I might find rest at last." );
   locals[1] = 3;
   func_0136( &locals[1] );
} // end func

void func_0b1b() {

   int locals[43];

   say( "Perhaps it's just a feeling -- I am not learned in the ways of magic." );
   locals[22] = 1;
   locals[1] = 86;
   locals[23] = private[8];
   locals[2] = 87;
   locals[24] = private[9];
   locals[3] = 88;
   locals[4] = 0;
   locals[43] = babl_fmenu( 0, &locals[1], &locals[22] );
   switch ( locals[43] ) {

   case 86:

      func_0830();
   break;

   case 87:

      func_0a6b();
   break;

   case 88:

      func_098e();
   break;

   } // end switch

} // end func

void func_0b94() {

   int locals[23];

   say( "Oh... my! So it wasn't just a feeling after all! Yes... I know it now -- it is His presence keeping me here. I am present here in order to oppose him!" );
   locals[1] = 90;
   locals[2] = 91;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_083d();
   break;

   } // end switch

   say( "Oh, thank thee! Thank thee!" );
   locals[23] = 3;
   func_0136( &locals[23] );
} // end func

conversation #75
string block 0x0e4a, name guard

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[22];

   npc_goal = 12;
   private[2] = 0;
   private[3] = 0;
   private[4] = 0;
   private[5] = 0;
   say( "Halt!  This area is restricted.  You are not authorized to enter." );
   locals[1] = 2;
   locals[2] = 3;
   locals[3] = 4;
   locals[4] = 5;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0165();
   break;

   case 2:

      func_0518();
   break;

   case 3:

      func_0543();
   break;

   case 4:

      func_04b2();
   break;

   } // end switch

} // end func

void func_03e3() {

   say( "You may not!  Leave immediately or I will be required to use force!" );
   func_0110();
} // end func

void func_03f0() {

   say( "Enough questions!  Leave immediately or I will be required to use force!" );
   func_0110();
} // end func

void func_03fd() {

   int locals[46];

   locals[1] = !private[2];
   locals[2] = !private[3];
   locals[3] = !private[4];
   locals[25] = locals[1];
   locals[4] = 8;
   locals[26] = locals[2];
   locals[5] = 9;
   locals[27] = locals[3];
   locals[6] = 10;
   locals[28] = 1;
   locals[7] = 11;
   locals[8] = 0;
   locals[46] = babl_fmenu( 0, &locals[4], &locals[25] );
   switch ( locals[46] ) {

   case 8:

      func_0543();
   break;

   case 9:

      func_0518();
   break;

   case 10:

      func_04b2();
   break;

   case 11:

      func_03e3();
   break;

   } // end switch

} // end func

void func_04a5() {

   say( "Anodunos is the city I serve." );
   func_03fd();
} // end func

void func_04b2() {

   int locals[22];

   if ( private[5] >= 3 ) {

      func_03f0();
   } // end if

   if ( !private[4] ) {

      private[5] = private[5] + 1;
   } // end if

   private[4] = 1;
   say( "Beyond lie the controls to the dam in the reservoir of Anodunos." );
   locals[1] = 14;
   locals[2] = 15;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_04a5();
   break;

   case 2:

      func_03f0();
   break;

   } // end switch

} // end func

void func_0518() {

   if ( private[5] >= 3 ) {

      func_03f0();
   } // end if

   if ( !private[3] ) {

      private[5] = private[5] + 1;
   } // end if

   private[3] = 1;
   say( "I am ordered to only allow the two operators of the dam controls to pass, and they may only pass together, as each operator only knows half the combination to the controls." );
   func_03fd();
} // end func

void func_0543() {

   if ( private[5] >= 3 ) {

      func_03f0();
   } // end if

   if ( !private[2] ) {

      private[5] = private[5] + 1;
   } // end if

   private[2] = 1;
   say( "I am Sentinel Construct 868.  My duty is to protect the controls to the dam." );
   func_03fd();
} // end func

could not find string block 0x0e4c.
could not find string block 0x0e4d.
could not find string block 0x0e4e.
could not find string block 0x0e4f.
could not load code ...
conversation #81
string block 0x0e50, name Prinx

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[47];

   private[2] = sex( 2, &locals[2], &locals[1] );
   locals[1] = 1;
   locals[2] = 2;
   if ( private[0] == 0 ) {

      locals[3] = 20;
      if ( get_quest( 1, &locals[3] ) ) {

         say( "Who art thou? I seem to remember thee from somewhere..." );
         locals[4] = 4;
         locals[5] = 5;
         locals[6] = 0;
         locals[25] = babl_menu( 0, &locals[4] );
         switch ( locals[25] ) {

         case 1:

            func_042f();
         break;

         case 2:

            func_050a();
         } // end if

      } else {

      break;

      } // end switch

      func_05c2();
   } // end if

   say( "Greetings, @GS33! How dost thou find my realm, now?" );
   locals[26] = 7;
   locals[27] = 8;
   locals[28] = 9;
   locals[29] = 0;
   locals[47] = babl_menu( 0, &locals[26] );
   switch ( locals[47] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

      func_0632();
   break;

   } // end switch

   say( "Indeed, thou hast it now! Explore as long as thou wouldst like." );
   func_0165();
} // end func

void func_042f() {

   int locals[22];

   say( "Mokpo the Mad? I sometimes dream of one with that name. A nightmare!" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0477();
   break;

   case 2:

      func_04c2();
   break;

   } // end switch

} // end func

void func_0477() {

   int locals[22];

   say( "I am being chased by apes is so cold and damp, and I am weak with hunger! I wake filled with fear!" );
   locals[1] = 15;
   locals[2] = 16;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_04c2();
   break;

   case 2:

   break;

   } // end switch

   say( "@GS33, thou dost offend me! This is my home! But allow me to introduce myself..." );
   func_05c2();
} // end func

void func_04c2() {

   int locals[22];

   say( "I? That wretch? Nay, 'tis impossible! He is just a dream I have sometimes. My name is Mokpo the Mighty, fearless adventurer!" );
   locals[1] = 19;
   locals[2] = 20;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_05c2();
   break;

   case 2:

      func_0566();
   break;

   } // end switch

} // end func

void func_050a() {

   int locals[22];

   say( "Yet it seems I met you, once before... perhaps in a dream?" );
   locals[1] = 22;
   locals[2] = 23;
   locals[3] = 24;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0477();
   break;

   case 2:

      func_0566();
   break;

   case 3:

      func_05c2();
   break;

   } // end switch

} // end func

void func_0566() {

   int locals[22];

   say( "No doubt. 'Tis easy to think such things with dreams." );
   locals[1] = 26;
   locals[2] = 27;
   locals[3] = 28;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_05c2();
   break;

   case 2:

      func_05c2();
   break;

   case 3:

      func_05c2();
   break;

   } // end switch

} // end func

void func_05c2() {

   int locals[22];

   say( "I am Mokpo the Mighty, and I welcome thee to this world! 'Tis beautiful, is it not? And the inhabitants, so friendly!" );
   locals[1] = 30;
   locals[2] = 31;
   locals[3] = 32;
   locals[4] = 33;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_07a3();
   break;

   case 2:

      func_0796();
   break;

   case 3:

      func_0632();
   break;

   case 4:

      func_074b();
   break;

   } // end switch

} // end func

void func_0632() {

   int locals[88];

   say( "'Tis an odd question, @GS33, for I know not the answer myself. Each color has its own character and challenges -- if thou shouldst pass through realms of four colors, perhaps thou shalt find a fifth!" );
   locals[1] = 35;
   locals[2] = 36;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0705;

   break;

   case 2:

   break;

   } // end switch

   say( "I have not ventured through the colored realms in much time, so 'tis difficult to say. Know this, though that the Void is not as other realms." );
   locals[23] = 38;
   locals[24] = 39;
   locals[25] = 40;
   locals[26] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_06c5;

   break;

   case 2:

   break;

   case 3:

   break;

   } // end switch

   label_06c5:;

   label_06c5:;

   say( "'Twill be of little use to thee to make haste with thy feet, or to seek advancement in any single direction -- daring and a quick wit are what shall bear thee through this place! Simply defeat the challenges that are offered thee, and thou shalt arrive whereever it is thou seekest." );
   locals[45] = 42;
   locals[46] = 43;
   locals[47] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

      func_087f();
   break;

   case 2:

      func_0968();
   break;

   } // end switch

   label_0705:;

   say( "I have yet to reach the place myself. They say the Time Lord was imprisoned there by the Guardian, in a place called the Shrine of Spirituality." );
   locals[67] = 45;
   locals[68] = 46;
   locals[69] = 0;
   locals[88] = babl_menu( 0, &locals[67] );
   switch ( locals[88] ) {

   case 1:

      func_0915();
   break;

   case 2:

   break;

   } // end switch

   say( "Beware, @GS33!" );
   goto label_06c5;

} // end func

void func_074b() {

   int locals[22];

   say( "Nay, worry not! Some of them are perhaps a bit testy, but surely that may be forgiven them." );
   locals[1] = 49;
   locals[2] = 50;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08fb();
   break;

   case 2:

   break;

   } // end switch

   say( "That's the spirit!" );
   func_0968();
} // end func

void func_0796() {

   say( "Thou dost show little appreciation for the wonders of the grotesque, @GS33. Thou shouldst educate thyself." );
   func_087f();
} // end func

void func_07a3() {

   int locals[66];

   say( "I am so glad thou dost think so! Ever since the Time Lord won free of his cage, there have been few willing to stay long in my realm." );
   locals[1] = 54;
   locals[2] = 55;
   locals[3] = 56;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0796();
   break;

   case 2:

      goto label_07fc;

   break;

   case 3:

      goto label_083c;

   break;

   } // end switch

   label_07fc:;

   say( "He was the Guardian's guest in my realm. He stayed for a while in the Shrine of Spirituality, but then departed abruptly! Quite rude, I thought him." );
   locals[23] = 58;
   locals[24] = 59;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_083c;

   break;

   case 2:

      func_095d();
   break;

   } // end switch

   label_083c:;

   label_083c:;

   say( "Around here somewhere, but this Realm is not always as I remember it. I do know that it has a color, but that there is no path of its color to walk!" );
   locals[45] = 61;
   locals[46] = 62;
   locals[47] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

      func_087f();
   break;

   case 2:

      func_0968();
   break;

   } // end switch

} // end func

void func_087f() {

   int locals[23];

   say( "While thou art here, be sure to visit the Red Hell -- 'tis quite a sight, if thou'rt not afraid to shed thy blood. Else perhaps the Cerulean Plains might be more to thy liking." );
   locals[1] = 64;
   locals[2] = 65;
   locals[3] = 66;
   locals[4] = 67;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08fb();
   break;

   case 2:

      func_0968();
   break;

   case 3:

   break;

   case 4:

      func_0908();
   break;

   } // end switch

   say( "Do so! It has been quite pleasant, these last few centuries. Follow the blue path, then." );
   locals[23] = 3;
   func_0136( &locals[23] );
} // end func

void func_08fb() {

   say( "Your pardon, @GS33. I knew not that thou wert a coward. Please excuse me." );
   func_0156();
} // end func

void func_0908() {

   say( "The door is before thee, friend, although it does not always lead to the same place..." );
   func_0165();
} // end func

void func_0915() {

   int locals[22];

   say( "There are many paths to that place -- seek ye a pyramid, with a moongate at its summit. Thou wilt have to pass throught it a full four times, but 'twill be worth thy while. It often lies past the Glare of the Guardian, in an ancient realm." );
   locals[1] = 72;
   locals[2] = 73;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_095d();
   break;

   case 2:

      func_0968();
   break;

   } // end switch

} // end func

void func_095d() {

   say( "My Realm has many inhabitants, traveler. I do not play favorites between them." );
} // end func

void func_0968() {

   say( "I shall leave thee to explore!" );
   func_0165();
} // end func

conversation #82
string block 0x0e51, name Mystell

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[140];

   if ( private[0] == 0 ) {

      private[2] = 0;
      private[3] = 0;
      locals[1] = 1;
      print( 1, &locals[1] );
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      locals[24] = 4;
      print( 1, &locals[24] );
      locals[25] = 5;
      locals[26] = 6;
      locals[27] = 7;
      locals[28] = 0;
      locals[46] = babl_menu( 0, &locals[25] );
      switch ( locals[46] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

         func_0147();
      break;

      } // end switch

      locals[47] = 8;
      print( 1, &locals[47] );
      locals[48] = 9;
      locals[49] = 10;
      locals[50] = 0;
      locals[69] = babl_menu( 0, &locals[48] );
      switch ( locals[69] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      locals[70] = 11;
      print( 1, &locals[70] );
      locals[71] = 12;
      locals[72] = 13;
      locals[73] = 14;
      locals[74] = 0;
      locals[92] = babl_menu( 0, &locals[71] );
      switch ( locals[92] ) {

      case 1:

         func_0573();
      break;

      case 2:

      break;

      case 3:

         func_05ac();
      break;

      } // end switch

      func_0594();
   } // end if

   if ( private[2] ) {

      locals[93] = 15;
      print( 1, &locals[93] );
      locals[94] = 16;
      locals[95] = 17;
      locals[96] = 0;
      locals[115] = babl_menu( 0, &locals[94] );
      switch ( locals[115] ) {

      case 1:

         func_05ac();
      break;

      case 2:

      break;

      } // end switch

      locals[116] = 18;
      print( 1, &locals[116] );
      locals[117] = 3;
      func_0136( &locals[117] );
   } // end if

   if ( private[0] ) {

      locals[118] = 19;
      print( 1, &locals[118] );
      locals[119] = 20;
      locals[120] = 21;
      locals[121] = 0;
      locals[140] = babl_menu( 0, &locals[119] );
      switch ( locals[140] ) {

      case 1:

         func_05ac();
      break;

      case 2:

         func_0594();
      } // end if

   break;

   } // end switch

} // end func

void func_0573() {

   int locals[2];

   locals[1] = 22;
   print( 1, &locals[1] );
   locals[2] = 3;
   func_0136( &locals[2] );
} // end func

void func_0594() {

   int locals[1];

   locals[1] = 23;
   print( 1, &locals[1] );
   func_0147();
} // end func

void func_05ac() {

   int locals[81];

   locals[1] = find_barter( 1, &locals[6] );
   locals[6] = 272;
   if ( locals[1] > 0 ) {

      if ( private[3] > 2 ) {

         locals[7] = 24;
         print( 1, &locals[7] );
         locals[8] = 25;
         locals[9] = 0;
         locals[29] = babl_menu( 0, &locals[8] );
         if ( locals[29] == 1 ) {

            func_0147();
         } // end if

      } // end if

      locals[3] = count_inv( 1, &locals[1] );
      if ( locals[3] == 1 ) {

         locals[4] = 1;
      } else {

         locals[4] = 2 - private[3];
      } // end if

      locals[5] = 26;
      if ( locals[4] > 1 ) {

         locals[5] = 27;
      } // end if

      private[2] = 1;
      locals[30] = 28;
      print( 1, &locals[30] );
      give_ptr_npc( 2, &locals[4], &locals[1] );
      private[3] = private[3] + locals[4];
      if ( private[3] == 2 ) {

         locals[31] = 29;
         print( 1, &locals[31] );
         locals[2] = take_from_npc( 1, &locals[32] );
         locals[32] = 311;
         if ( locals[2] == 2 ) {

            locals[33] = 30;
            print( 1, &locals[33] );
         } // end if

         locals[34] = 31;
         print( 1, &locals[34] );
         locals[35] = 32;
         locals[36] = 0;
         locals[56] = babl_menu( 0, &locals[35] );
         if ( locals[56] == 1 ) {

         } // end if

         remove_talker( 0 );
         func_0147();
      } // end if

      locals[57] = 1;
      pause( 1, &locals[57] );
      say( "He then bows to you and walks happily away." );
      locals[58] = 3;
      func_0136( &locals[58] );
   } else {

      locals[59] = 34;
      print( 1, &locals[59] );
      locals[60] = 35;
      locals[61] = 36;
      locals[62] = 0;
      locals[81] = babl_menu( 0, &locals[60] );
      switch ( locals[81] ) {

      case 1:

         func_05ac();
      break;

      case 2:

         func_0594();
      } // end if

   break;

   } // end switch

} // end func

conversation #83
string block 0x0e52, name 

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[22];

   say( "Have you seen him? He must be here somewhere!" );
   locals[1] = 2;
   locals[2] = 3;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_03a2();
   break;

   case 2:

      func_03ea();
   break;

   } // end switch

} // end func

void func_03a2() {

   int locals[22];

   say( "The Guardian! He haunts my dreams!" );
   locals[1] = 5;
   locals[2] = 6;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_03fc();
   break;

   case 2:

      func_03ea();
   break;

   } // end switch

} // end func

void func_03ea() {

   say( "I come here every night, when I sleep! The Guardian has sent me here, I know it! "Seek ye the Sigil," he said to me, "Seek ye the White Gates!" Now each night I dream of this horrible place. I must hurry on -- if he sees me tarrying with thee, who knows what he might do!" );
   remove_talker( 0 );
   func_0165();
} // end func

void func_03fc() {

   int locals[1];

   say( "He appeared to me as I slept, and intoned "Seek ye the Sigil! Seek ye the White Gates!" Now each night I dream of this horrid place! I must hurry on, lest he see that I am tarrying." );
   locals[1] = 9;
   print( 1, &locals[1] );
   remove_talker( 0 );
   func_0165();
} // end func

conversation #84
string block 0x0e53, name Iolo

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   if ( private[0] == 0 ) {

      say( "Ha ha ha!! Thou art trapped like a rat! Even the Time Lord couldn't escape that cage! Ha ha ha ha ha!" );
      npc_goal = 1;
      func_0165();
   } else {

      say( "Don't call on me for help! I'm not one to mess with the Guardian's work!" );
      func_0165();
   } // end if

} // end func

conversation #85
string block 0x0e54, name Blog

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[224];

   locals[1] = get_quest( 1, &locals[3] );
   locals[3] = 26;
   locals[2] = 0;
   locals[4] = 27;
   if ( get_quest( 1, &locals[4] ) ) {

      locals[1] = 0;
      locals[2] = 1;
   } // end if

   locals[5] = 3;
   locals[6] = 10001;
   if ( x_clock( 2, &locals[6], &locals[5] ) > 0 ) {

      locals[2] = 1;
   } // end if

   say( "Avatar! What art thou doing here?" );
   locals[7] = 2;
   locals[8] = 3;
   locals[9] = 0;
   locals[28] = babl_menu( 0, &locals[7] );
   switch ( locals[28] ) {

   case 1:

   break;

   case 2:

      goto label_0542;

   break;

   } // end switch

   say( "Why... I am here every night!" );
   locals[29] = 5;
   locals[30] = 6;
   locals[31] = 0;
   locals[50] = babl_menu( 0, &locals[29] );
   switch ( locals[50] ) {

   case 1:

   break;

   case 2:

      goto label_046f;

   break;

   } // end switch

   say( "Do not be silly! What hath a man to fear in his dreams?" );
   locals[51] = 8;
   locals[52] = 9;
   locals[53] = 0;
   locals[72] = babl_menu( 0, &locals[51] );
   switch ( locals[72] ) {

   case 1:

      goto label_057e;

   break;

   case 2:

      goto label_057e;

   break;

   } // end switch

   label_046f:;

   say( "Why, I have dreamed of this place nightly, for years -- 'tis indeed a strange domain, and I can never recall it upon waking..." );
   locals[94] = 1;
   locals[73] = 11;
   locals[95] = locals[1];
   locals[74] = 12;
   locals[96] = locals[2];
   locals[75] = 13;
   locals[97] = 1;
   locals[76] = 14;
   locals[77] = 0;
   locals[115] = babl_fmenu( 0, &locals[73], &locals[94] );
   switch ( locals[115] ) {

   case 11:

      goto label_04fc;

   break;

   case 12:

      goto label_0658;

   break;

   case 13:

      goto label_0662;

   break;

   case 14:

      goto label_057e;

   break;

   } // end switch

   label_04fc:;

   label_04fc:;

   say( "There is much to see here . . . . For many years I have striven to reach the Shrine, but in vain!" );
   locals[116] = 16;
   locals[117] = 17;
   locals[118] = 0;
   locals[137] = babl_menu( 0, &locals[116] );
   switch ( locals[137] ) {

   case 1:

   break;

   case 2:

      goto label_053d;

   break;

   } // end switch

   say( "Why, the Shrine of Spirituality! Some say one may only enter inside it in one's dreams." );
   label_053d:;

   say( "This is a vast and treacherous realm. I have yet to overcome its dangers. If only I were one of those who dreamed they could fly . . ." );
   goto label_064e;

   label_0542:;

   say( "But I am! I am in the castle!" );
   locals[138] = 21;
   locals[139] = 22;
   locals[140] = 0;
   locals[159] = babl_menu( 0, &locals[138] );
   switch ( locals[159] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   label_057e:;

   label_057e:;

   label_057e:;

   say( "Avatar, thou art the oddest dream I have ever had. I am asleep in my bed -- art thou not asleep, too?" );
   locals[160] = 24;
   locals[161] = 25;
   locals[162] = 0;
   locals[181] = babl_menu( 0, &locals[160] );
   switch ( locals[181] ) {

   case 1:

   break;

   case 2:

      goto label_0649;

   break;

   } // end switch

   say( "Then am I in thy dream, or thy in mine? And what sort of place have we dreamed up?" );
   label_05bf:;

   locals[203] = 1;
   locals[182] = 27;
   locals[204] = locals[1];
   locals[183] = 28;
   locals[205] = locals[2];
   locals[184] = 29;
   locals[206] = 1;
   locals[185] = 30;
   locals[186] = 0;
   locals[224] = babl_fmenu( 0, &locals[182], &locals[203] );
   switch ( locals[224] ) {

   case 27:

      goto label_04fc;

   break;

   case 28:

      goto label_0658;

   break;

   case 29:

      goto label_0662;

   break;

   case 30:

      goto label_064e;

   break;

   } // end switch

   label_0649:;

   say( "Truly, this is a marvel. 'Tis a pity I never remember my dreams when awake!" );
   goto label_05bf;

   label_064e:;

   label_064e:;

   say( "I cannot stay long  . . . Hark! I hear the morning bell ringing -- I must fly from here! Seek ye the pyramid, and beyond it, the Shrine of Spirituality!" );
   remove_talker( 0 );
   func_0165();
   label_0658:;

   label_0658:;

   say( "I cannot stay long  . . . Hark! I hear the morning bell ringing -- I must fly from here! Vanquish the Red Destroyer -- he has the sceptre you seek!" );
   remove_talker( 0 );
   func_0165();
   label_0662:;

   label_0662:;

   say( "I cannot stay long  . . . Hark! I hear the morning bell ringing -- I must fly from here! Seek ye the white gates, if thou wouldst find the Sigil!" );
   remove_talker( 0 );
   func_0165();
} // end func

conversation #86
string block 0x0e55, name Rawstag

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[287];

   locals[1] = 63;
   if ( get_quest( 1, &locals[1] ) ) {

      say( "Hey! Blog know you! Blog meet you when a-wake, now you here in dream! Fun-ny!" );
   } else {

      say( "Blog dream hu-man come talk to him. That fun-ny!" );
   } // end if

   label_0378:;

   label_0378:;

   label_0378:;

   label_0378:;

   label_0378:;

   label_0378:;

   label_0378:;

   label_0378:;

   locals[2] = 3;
   locals[3] = 4;
   locals[4] = 5;
   locals[5] = 6;
   locals[6] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      goto label_07c6;

   break;

   case 2:

      goto label_04b4;

   break;

   case 3:

      goto label_03e2;

   break;

   case 4:

      goto label_03dd;

   break;

   } // end switch

   label_03dd:;

   say( "Next time, you dream you talk to me, ok?" );
   func_0165();
   label_03e2:;

   say( "That no-thing. You want hear real good joke?" );
   locals[24] = 9;
   locals[25] = 10;
   locals[26] = 0;
   locals[45] = babl_menu( 0, &locals[24] );
   switch ( locals[45] ) {

   case 1:

      goto label_0427;

   break;

   case 2:

      goto label_0422;

   break;

   } // end switch

   label_0422:;

   say( "Too bad for you. You miss joke. Blog go fight yak in-stead!" );
   func_0165();
   label_0427:;

   say( "Why is Blog like pine tree?" );
   locals[46] = 13;
   locals[47] = 14;
   locals[48] = 0;
   locals[67] = babl_menu( 0, &locals[46] );
   switch ( locals[67] ) {

   case 1:

      goto label_0467;

   break;

   case 2:

      goto label_046c;

   break;

   } // end switch

   label_0467:;

   say( "It be-cause... Uh oh, Blog for-get! For-get fun-ny part of joke! Oh well." );
   goto label_0378;

   label_046c:;

   say( "Good for you! It real fun-ny joke, huh? Blog hear from imp in Shrine of Spi-rit . . . uh, Blog forget where!" );
   locals[68] = 17;
   locals[69] = 18;
   locals[70] = 0;
   locals[89] = babl_menu( 0, &locals[68] );
   switch ( locals[89] ) {

   case 1:

   break;

   case 2:

      goto label_04af;

   break;

   } // end switch

   say( "Blog find gold moon-gate. You find too, you go there, Blog think. But you take care, struc-ture of Void is sto-chas-tic!" );
   goto label_0378;

   label_04af:;

   say( "Blog find gem there, like gem you have! But gem too shi-ny. Make game hard, so me leave." );
   goto label_0378;

   label_04b4:;

   say( "Be-cause Blog not this smart a-wake! Blog just use big words like cin-na-mon, and al-ways win game of White Rock Black Rock! Must be dream, that nev-er hap-pen!" );
   locals[90] = 22;
   locals[91] = 23;
   locals[92] = 24;
   locals[93] = 0;
   locals[111] = babl_menu( 0, &locals[90] );
   switch ( locals[111] ) {

   case 1:

      goto label_0508;

   break;

   case 2:

      goto label_050d;

   break;

   case 3:

      goto label_0552;

   break;

   } // end switch

   label_0508:;

   say( "Blog not know what it mean, but Blog say that word! Say lots more words too, you bet!" );
   goto label_0378;

   label_050d:;

   say( "Blog not have to wake up, Flip do that! Till then, Blog like to have dream!" );
   locals[112] = 27;
   locals[113] = 28;
   locals[114] = 0;
   locals[133] = babl_menu( 0, &locals[112] );
   switch ( locals[133] ) {

   case 1:

      goto label_0552;

   break;

   case 2:

      goto label_054d;

   break;

   } // end switch

   label_054d:;

   say( "Flip is imp of dawn. He make you wake up when dream get too good! Uh oh, too much fun, soon Blog might start to wake up!" );
   func_0165();
   label_0552:;

   label_0552:;

   say( "Ok! You go first! You want fish, or move to lim-bo?" );
   locals[134] = 31;
   locals[135] = 32;
   locals[136] = 33;
   locals[137] = 0;
   locals[155] = babl_menu( 0, &locals[134] );
   switch ( locals[155] ) {

   case 1:

      goto label_05ab;

   break;

   case 2:

      goto label_05ff;

   break;

   case 3:

      goto label_05a6;

   break;

   } // end switch

   label_05a6:;

   label_05a6:;

   label_05a6:;

   label_05a6:;

   label_05a6:;

   label_05a6:;

   label_05a6:;

   label_05a6:;

   label_05a6:;

   say( "Hur hur hur! You lose! Blog win a-gain, must be dream for sure!" );
   goto label_0378;

   label_05ab:;

   say( "Blog squash peas! You in tough spot now!" );
   locals[156] = 36;
   locals[157] = 37;
   locals[158] = 38;
   locals[159] = 0;
   locals[177] = babl_menu( 0, &locals[156] );
   switch ( locals[177] ) {

   case 1:

      goto label_0667;

   break;

   case 2:

      goto label_06bb;

   break;

   case 3:

      goto label_05ff;

   break;

   } // end switch

   label_05ff:;

   label_05ff:;

   say( "Oh, you get free turn! Pick Nam-by, Pam-by, or Bam-bi!" );
   locals[178] = 40;
   locals[179] = 41;
   locals[180] = 42;
   locals[181] = 43;
   locals[182] = 0;
   locals[199] = babl_menu( 0, &locals[178] );
   switch ( locals[199] ) {

   case 1:

      goto label_05a6;

   break;

   case 2:

      goto label_06c0;

   break;

   case 3:

      goto label_0700;

   break;

   case 4:

      goto label_0700;

   break;

   } // end switch

   label_0667:;

   say( "Oh, that smart! Blog count fin-gers. Now your turn a-gain." );
   locals[200] = 45;
   locals[201] = 46;
   locals[202] = 47;
   locals[203] = 0;
   locals[221] = babl_menu( 0, &locals[200] );
   switch ( locals[221] ) {

   case 1:

      goto label_05a6;

   break;

   case 2:

      goto label_0700;

   break;

   case 3:

      goto label_0754;

   break;

   } // end switch

   label_06bb:;

   say( "Then Blog eat squash in-stead. Hey, Blog win! This great dream or what?" );
   goto label_0378;

   label_06c0:;

   say( "Blog for-get what come next. You know?" );
   locals[222] = 50;
   locals[223] = 51;
   locals[224] = 0;
   locals[243] = babl_menu( 0, &locals[222] );
   switch ( locals[243] ) {

   case 1:

      goto label_0759;

   break;

   case 2:

      goto label_05a6;

   break;

   } // end switch

   label_0700:;

   label_0700:;

   label_0700:;

   say( "Last chance round! How man-y?" );
   locals[244] = 53;
   locals[245] = 54;
   locals[246] = 55;
   locals[247] = 0;
   locals[265] = babl_menu( 0, &locals[244] );
   switch ( locals[265] ) {

   case 1:

      goto label_05a6;

   break;

   case 2:

      goto label_05a6;

   break;

   case 3:

      goto label_0759;

   break;

   } // end switch

   label_0754:;

   say( "If Blog live here, Blog be home by now! Wow, Blog win a-gain! Blog have real good time now!" );
   goto label_0378;

   label_0759:;

   label_0759:;

   say( "Okay, you do wrong thing now, you win!" );
   locals[266] = 58;
   locals[267] = 59;
   locals[268] = 60;
   locals[269] = 61;
   locals[270] = 0;
   locals[287] = babl_menu( 0, &locals[266] );
   switch ( locals[287] ) {

   case 1:

      goto label_05a6;

   break;

   case 2:

      goto label_05a6;

   break;

   case 3:

      goto label_05a6;

   break;

   case 4:

      goto label_07c1;

   break;

   } // end switch

   label_07c1:;

   say( "Hey, you win! Uh oh, Blog start wa-king up now!" );
   func_0165();
   label_07c6:;

   say( "Blog dream this place all the time! Climb co-lor moun-tain four times. Then go through gold gate. Or may-be o-ther way 'round? First fight dae-mons, though. Then maze. Or maze, then dae-mons? Or wait? When was purple sli-dy part? Blog forget!" );
   goto label_0378;

} // end func

could not find string block 0x0e57.
could not load code ...
could not find string block 0x0e59.
could not find string block 0x0e5a.
could not find string block 0x0e5b.
could not find string block 0x0e5c.
could not find string block 0x0e5d.
could not find string block 0x0e5e.
could not find string block 0x0e5f.
could not load code ...
conversation #97
string block 0x0e60, name Zogith

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[594];

   locals[1] = 0;
   if ( private[0] == 0 ) {

      locals[7] = 1;
      locals[8] = 1;
      locals[9] = 10001;
      locals[10] = x_clock( 2, &locals[9], &locals[8] ) + 1;
      x_clock( 2, &locals[10], &locals[7] );
      private[4] = 0;
      private[3] = 0;
   } else {

      locals[11] = 26;
      if ( get_quest( 1, &locals[11] ) == 1 ) {

      } else {

      } // end if

      say( "Who disturbs my studies? But hold, I sense thou art a traveller from another dimension." );
      locals[12] = 2;
      locals[13] = 4;
      locals[14] = 6;
      locals[15] = 0;
      locals[33] = babl_menu( 0, &locals[12] );
      switch ( locals[33] ) {

      case 1:

         say( "I think not. The signs are unmistakable. " );
      break;

      case 2:

         say( "I have dealt with other planes myself, through my magic. " );
      break;

      case 3:

         say( "Indeed! I have heard of that realm. " );
      break;

      } // end switch

      say( "But tell me, what dost thou here?" );
      locals[34] = 9;
      locals[35] = 10;
      locals[36] = 11;
      locals[37] = 0;
      locals[55] = babl_menu( 0, &locals[34] );
      switch ( locals[55] ) {

      case 1:

         goto label_046d;

      break;

      case 2:

         goto label_04b2;

      break;

      case 3:

         goto label_050b;

      break;

      } // end switch

      label_046d:;

      say( "Truly? Mayhap 'tis time I took action myself." );
      locals[56] = 13;
      locals[57] = 14;
      locals[58] = 0;
      locals[77] = babl_menu( 0, &locals[56] );
      switch ( locals[77] ) {

      case 1:

         goto label_04ad;

      break;

      case 2:

         goto label_050b;

      break;

      } // end switch

      label_04ad:;

      say( "Of that I am currently uncertain. Although I have mastered many powerful enchantments, and possess much knowledge, it has been long since I considered applying my work and wisdom to matters of consequence." );
      goto label_0518;

      label_04b2:;

      say( "Thou canst find that above, in the possession of those who dwell on the uppermost level of these pits. What they do is of no concern to me." );
      locals[78] = 17;
      locals[79] = 18;
      locals[80] = 19;
      locals[81] = 0;
      locals[99] = babl_menu( 0, &locals[78] );
      switch ( locals[99] ) {

      case 1:

         goto label_0506;

      break;

      case 2:

         goto label_0506;

      break;

      case 3:

         goto label_050b;

      break;

      } // end switch

      label_0506:;

      label_0506:;

      say( "I have sought out this place that I might conduct my magical research without disturbances. Indeed -- the Guardian's magical seal prevents all but the most powerful from entering or leaving the Pits. But methinks I have spent too much time pursuing obscure knowledge, when there are things that must be done." );
      goto label_050e;

      label_050b:;

      label_050b:;

      label_050b:;

      say( "I have spent my time trying to further my knowledge of the mystic arts. But I have been neglecting the practical in favor of the esoteric. " );
      label_050e:;

      say( "I know that the Guardian has conquered other worlds than mine. He must be stopped before his power grows too great." );
      goto label_0518;

   } // end if

   say( "Ah, @GS8, welcome back. How can I help thee?" );
   goto label_0518;

} // end if

label_0518:;

label_0518:;

label_0518:;

label_0518:;

label_0518:;

label_0518:;

label_0518:;

label_0518:;

label_0518:;

label_0518:;

label_0518:;

label_0518:;

label_0518:;

label_0518:;

locals[1] = 1 - get_quest( 1, &locals[100] );
locals[100] = 26;
locals[2] = get_quest( 1, &locals[101] );
locals[101] = 27;
locals[3] = private[3];
locals[4] = !locals[3];
if ( private[4] ) {

   locals[3] = 0;
} // end if

locals[123] = locals[4];
locals[102] = 24;
locals[124] = locals[1];
locals[103] = 25;
locals[125] = locals[2];
locals[104] = 26;
locals[126] = 1;
locals[105] = 27;
locals[127] = 1;
locals[106] = 28;
locals[128] = locals[3];
locals[107] = 30;
locals[129] = private[4];
locals[108] = 31;
locals[109] = 0;
locals[144] = babl_fmenu( 0, &locals[102], &locals[123] );
switch ( locals[144] ) {

case 24:

   goto label_063a;

break;

case 25:

   goto label_0b85;

break;

case 26:

   goto label_085d;

break;

case 27:

   goto label_07e4;

break;

case 28:

   say( "Until we meet again, Avatar." );
   func_0165();
break;

case 30:

   goto label_06fb;

break;

case 31:

   goto label_0ab1;

break;

} // end switch

label_063a:;

say( "Ours has always been a land where prowess at arms is highly respected. Yet duels were seldom to the death, and slavery almost unheard of, until the Guardian came. He has slowly warped our people, twisted our realm into a harsher, more violent place, and the worst of this new breed are sent to the Pits." );
locals[145] = 33;
locals[146] = 34;
locals[147] = 0;
locals[166] = babl_menu( 0, &locals[145] );
switch ( locals[166] ) {

case 1:

   goto label_06bb;

break;

case 2:

break;

} // end switch

label_0678:;

say( "Many aspire now to join the Guardian's elite forces in their raids on other dimensions. Though the toll in human life is often high, the survivors have brought home the richest of spoils, and live like kings. Some would slay their own brothers for a chance to join in the plunder." );
locals[167] = 36;
locals[168] = 37;
locals[169] = 0;
locals[188] = babl_menu( 0, &locals[167] );
switch ( locals[188] ) {

case 1:

break;

case 2:

   goto label_06bb;

break;

} // end switch

label_06b6:;

say( "I have no stomach for living amongst those who have lost all knowledge of simple human kindness. I have been in hiding, but my time has not been entirely wasted. My powers have grown enough that I may prove able to oppose the Guardian effectively, in my dimension at least." );
goto label_0518;

label_06bb:;

label_06bb:;

say( "The people of the Pits were too vicious to integrate into life aboveground, even after the changes began. The Guardian placed a mighty seal on these caverns, and now the worst criminals of our world are thrown in, to live or die as they may." );
locals[189] = 40;
locals[190] = 41;
locals[191] = 0;
locals[210] = babl_menu( 0, &locals[189] );
switch ( locals[210] ) {

case 1:

   goto label_0678;

break;

case 2:

   goto label_06b6;

break;

} // end switch

label_06fb:;

label_06fb:;

say( "It gladdens my heart that one of mine experiments has at long last a practical application. I would give the bottle to thee, for our shared cause... And yet, I perceive that the balance would be best served were we to make an exchange." );
locals[211] = 43;
locals[212] = 44;
locals[213] = 0;
locals[232] = babl_menu( 0, &locals[211] );
switch ( locals[232] ) {

case 1:

   goto label_073b;

break;

case 2:

   goto label_0777;

break;

} // end switch

label_073b:;

say( "The cosmic balance shifts every time there is any exchange or interaction between planes. But there's no time to discuss such nuances now. " );
locals[233] = 46;
locals[234] = 47;
locals[235] = 0;
locals[254] = babl_menu( 0, &locals[233] );
switch ( locals[254] ) {

case 1:

break;

case 2:

break;

} // end switch

label_0777:;

say( "Not long ago, a colleague of mine disappeared while making a study of dreaming -- he had with him a Sceptre of the Deadly Seeker, and I would dearly like to have news of him, and the Sceptre returned. If in thy interplanar wanderings thou canst find news of him and locate the sceptre, in return I shall give to you the Djinn bottle." );
locals[255] = 26;
locals[256] = 1;
set_quest( 2, &locals[256], &locals[255] );
locals[257] = 49;
locals[258] = 50;
locals[259] = 51;
locals[260] = 0;
locals[278] = babl_menu( 0, &locals[257] );
switch ( locals[278] ) {

case 1:

break;

case 2:

break;

case 3:

   say( "'Tis not to be found in this world, to be sure. But as thou canst travel the planes, thou should be able to find me one and bring it here. " );
break;

} // end switch

say( "Is there anything else thou wouldst know?" );
goto label_0518;

label_07e4:;

say( "In truth, I myself have journeyed to other planes, though more oft I use my magic to view them from here, or speak with their denizens." );
locals[279] = 55;
locals[280] = 56;
locals[281] = 57;
locals[282] = 0;
locals[300] = babl_menu( 0, &locals[279] );
switch ( locals[300] ) {

case 1:

   goto label_0838;

break;

case 2:

   goto label_0853;

break;

case 3:

   goto label_0858;

break;

} // end switch

label_0838:;

say( "Indeed, the Guardian has conquered many worlds already. He bends the wills of those he conquers, forcing them to devote their resources to his ends. Some worlds supply armies, while others produce supplies or feed his magical energies. And yet few have joined together to oppose him, and I fear soon he will be too powerful for any to oppose." );
locals[301] = 26;
if ( get_quest( 1, &locals[301] ) == 1 ) {

} else {

   goto label_0518;

   label_0853:;

   say( "Ah, you might as well ask how many grains of sand on a beach, or how many times one could take a quantity of liquid and divide it in half! It may be that the planes are of finite number, but if they are, it is a number that is beyond our ability to know." );
   goto label_0518;

   label_0858:;

   say( "Would that I could, my friend. But the astral projection method I employ can only transport mine own self. Perhaps there's some other way I can help thee?" );
   goto label_0518;

   label_085d:;

   say( "I must wait for the planets to reach the proper conjunction before casting my spell. But I promise thee, 'twill be most effective, thanks to thy kind assistance. Hast thou fared well in thy questing?" );
   locals[302] = 62;
   locals[303] = 64;
   locals[304] = 66;
   locals[305] = 0;
   locals[323] = babl_menu( 0, &locals[302] );
   switch ( locals[323] ) {

   case 1:

      say( "I am sorry to hear that, my friend." );
      goto label_0518;

   break;

   case 2:

      say( "Good! I am glad to hear it." );
      goto label_0518;

   break;

   case 3:

      goto label_08b7;

   break;

   } // end switch

   label_08b7:;

   label_08b7:;

   say( "Once more, then. Thou must mix filanium-rich mud with basilisk oil, then coat a vessel in the mixture, and then immerse it in firey lava (the hotter, the better!). If thou personally are serving as the vessel, then thou must imbibe a potion of Iron Flesh. Lastly, thou shouldst only release the daemon by smashing the bottle at the Sigil of Binding on the Astral Plane -- to do so elsewhere would be disastrous!" );
   locals[324] = 68;
   locals[325] = 69;
   locals[326] = 0;
   locals[345] = babl_menu( 0, &locals[324] );
   switch ( locals[345] ) {

   case 1:

      goto label_0518;

   break;

   case 2:

   break;

   } // end switch

   say( "'Tis not easy to predict! Most likely, the daemon would remain inside thee, until thou didst choose to let it out, at which point it would erupt outward in a tremendous burst of energy!" );
} // end if

locals[346] = 27;
if ( get_quest( 1, &locals[346] ) == 1 ) {

} else {

   say( "Hast thou found the sceptre I need?" );
   locals[347] = 72;
   locals[348] = 74;
   locals[349] = 0;
   locals[368] = babl_menu( 0, &locals[347] );
   switch ( locals[368] ) {

   case 1:

      say( "I hope thou canst find it soon." );
      goto label_0518;

   break;

   case 2:

      goto label_0953;

   break;

   } // end switch

   label_0953:;

   label_0953:;

   label_0953:;

   private[2] = find_barter( 1, &locals[369] );
   locals[369] = 170;
   if ( private[2] == 0 ) {

   } else {

   } // end if

   say( "Well, art thou going to hand it to me or not?" );
   locals[370] = 76;
   locals[371] = 77;
   locals[372] = 0;
   locals[391] = babl_menu( 0, &locals[370] );
   switch ( locals[391] ) {

   case 1:

      goto label_0953;

   break;

   case 2:

      say( "Remember, 'tis urgent!" );
      goto label_0518;

   break;

   } // end switch

   locals[392] = 1;
   locals[393] = 3;
   identify_inv( 4, &locals[393], &locals[6], &locals[392], 33 );
   locals[394] = 79;
   if ( contains( 2, &locals[6], &locals[394] ) ) {

   } else {

      say( "Hmmm.  I'm afraid this is just @SS6. You can keep it." );
      locals[395] = 1;
      locals[396] = 7;
      locals[397] = -1;
      locals[398] = -1;
      locals[399] = -1;
      locals[400] = -1;
      locals[401] = -1;
      locals[402] = -1;
      x_obj_stuff( 9, &locals[402], &locals[401], &locals[400], &locals[399], &locals[398], &locals[397], &locals[396], &locals[395], 33 );
      say( "Hast thou anything else to show me?" );
      locals[403] = 82;
      locals[404] = 83;
      locals[405] = 0;
      locals[424] = babl_menu( 0, &locals[403] );
      switch ( locals[424] ) {

      case 1:

         goto label_0953;

      break;

      case 2:

         goto label_0518;

      break;

      } // end switch

   } // end if

   locals[425] = 1;
   give_ptr_npc( 2, &locals[425], 33 );
   locals[426] = 27;
   locals[427] = 1;
   set_quest( 2, &locals[427], &locals[426] );
   say( "Excellent! Now I will help thee as well. Here, take this bottle -- it contains within it the elemental.  Take great care in preserving it! The manufacture of a Djinn bottle is no trivial task." );
   goto label_0ad3;

   label_0ab1:;

   locals[428] = 278;
   locals[429] = 1;
   if ( find_inv( 2, &locals[429], &locals[428] ) ) {

      say( "Don't be silly, Avatar, you are carrying it with thee right now! Kindly do not waste my time with unnecessary requests." );
      func_0156();
   } // end if

   say( "Certainly, Avatar -- in the course of my research I have amassed quite a bestiary. I can certainly spare thee another." );
   label_0ad3:;

   private[4] = 1;
   locals[5] = do_inv_create( 1, &locals[430] );
   locals[430] = 278;
   locals[431] = 1;
   locals[432] = 65535;
   locals[433] = 65535;
   locals[434] = 65535;
   locals[435] = 65535;
   locals[436] = 65535;
   locals[437] = 65535;
   locals[438] = 10;
   x_obj_stuff( 9, &locals[438], &locals[437], &locals[436], &locals[435], &locals[434], &locals[433], &locals[432], &locals[431], &locals[5] );
   locals[439] = 278;
   take_from_npc( 1, &locals[439] );
   locals[440] = 87;
   locals[441] = 88;
   locals[442] = 0;
   locals[461] = babl_menu( 0, &locals[440] );
   switch ( locals[461] ) {

   case 1:

      goto label_08b7;

   break;

   case 2:

      func_0165();
   break;

   } // end switch

   label_0b85:;

   say( "Unfortunately, all of my efforts of late have been used in the rather obscure pursuit of Djinn entrapment. I have succeeded in entrapping a daemon of the air inside a magical container!" );
   private[3] = 1;
   locals[462] = 90;
   locals[463] = 91;
   locals[464] = 0;
   locals[483] = babl_menu( 0, &locals[462] );
   switch ( locals[483] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "'Tis a fascinating area of study. Such a vessel as mine has been enchanted to hold magical beings.  There is a series of rituals that must be performed, for otherwise the daemon could easily escape.  And I, for one, would not like to be in the vicinity of an escaped air-daemon.  The Djinn do not take kindly to imprisonment!" );
   locals[484] = 93;
   locals[485] = 94;
   locals[486] = 0;
   locals[505] = babl_menu( 0, &locals[484] );
   switch ( locals[505] ) {

   case 1:

   break;

   case 2:

      say( "Indeed." );
   break;

   } // end switch

   say( "First, of course, thou must have a container. Then one must coat it thoroughly with mud rich in the rare element Filanium, first mixing the mud with basilisk oil.  There used to be a great supply of this mud, in the city of Anodunos, but since that metropolis was destroyed Filanium has been hard to come by." );
   locals[506] = 97;
   locals[507] = 98;
   locals[508] = 0;
   locals[527] = babl_menu( 0, &locals[506] );
   switch ( locals[527] ) {

   case 1:

   break;

   case 2:

      locals[528] = 99;
      print( 1, &locals[528] );
   break;

   } // end switch

   say( "The next step is the firing of the vessel.  I would suggest immersion in lava as the best way to ensure success." );
   locals[529] = 101;
   locals[530] = 102;
   locals[531] = 0;
   locals[550] = babl_menu( 0, &locals[529] );
   switch ( locals[550] ) {

   case 1:

   break;

   case 2:

      say( "Wait!  I am almost finished!" );
   break;

   } // end switch

   say( "While it is necessary to perform these rituals when creating a Djinn bottle, keep in mind that they are largely symbolic rites. In practice, anything can be used as a vessel. Indeed, I have heard of sorcerers binding a daemon into the human body itself, and releasing its power in a single tremendous burst." );
   locals[551] = 105;
   locals[552] = 106;
   locals[553] = 0;
   locals[572] = babl_menu( 0, &locals[551] );
   switch ( locals[572] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "One thing more!  If thou doth ever have the necessity of releasing an elemental from its bottle, thou shouldst seek out the Sigil of Binding, a shrine located in the Ethereal Void.  There thou shouldst smash the bottle, releasing the Djinn.  If thou didst free the creature elsewhere, it would surely destroy thee!" );
   locals[573] = 108;
   locals[574] = 109;
   locals[575] = 0;
   locals[594] = babl_menu( 0, &locals[573] );
   switch ( locals[594] ) {

   case 1:

      goto label_06fb;

   break;

   case 2:

   break;

   } // end switch

   say( "My apologies for keeping you. I do have a tendency to ramble on about my studies. Farewell!" );
   func_0165();
} // end func

conversation #98
string block 0x0e61, name Zaria

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04d9();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[313];

   if ( private[0] == 0 ) {

      locals[1] = 1;
      say( "Greetings, stranger." );
      private[2] = 0;
   } else {

      say( "Hello again." );
   } // end if

   label_04f8:;

   label_04f8:;

   label_04f8:;

   label_04f8:;

   label_04f8:;

   label_04f8:;

   label_04f8:;

   label_04f8:;

   label_04f8:;

   label_04f8:;

   private[4] = 1 - locals[1];
   locals[23] = locals[1];
   locals[2] = 19;
   locals[24] = private[4];
   locals[3] = 20;
   locals[25] = 1;
   locals[4] = 21;
   locals[26] = 1;
   locals[5] = 22;
   locals[27] = 1;
   locals[6] = 23;
   locals[7] = 0;
   locals[44] = babl_fmenu( 0, &locals[2], &locals[23] );
   switch ( locals[44] ) {

   case 19:

      goto label_05a7;

   break;

   case 20:

      func_0989();
   break;

   case 21:

      goto label_05b1;

   break;

   case 22:

      goto label_0858;

   break;

   case 23:

      func_0165();
   break;

   } // end switch

   label_05a7:;

   say( "Indeed I am, but not much of one, I fear. I'd fare better in battle if I were as learned as Zaria." );
   locals[1] = 0;
   goto label_04f8;

   label_05b1:;

   say( "She is a very powerful mage. She strikes down her foes in the Arena with fire and lightning before they can get close enough to lay a finger on her. Would that I had mastered such enchantments!" );
   locals[45] = 26;
   locals[46] = 27;
   locals[47] = 28;
   locals[48] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

      goto label_0605;

   break;

   case 2:

      goto label_0620;

   break;

   case 3:

      goto label_0794;

   break;

   } // end switch

   label_0605:;

   locals[67] = 121;
   if ( get_quest( 1, &locals[67] ) ) {

      say( "Indeed, before thou didst best Dorstag, she rivalled him for rulership of the Pits, though she feared his deadly  aim with a crossbow." );
   } else {

      say( "Aye, she is ranked second highest in the Arena, behind only Dorstag himself. If she doth find the nerve to face his crossbow, mayhap we'll have a new top dog down here." );
   } // end if

   goto label_04f8;

   label_0620:;

   say( "Indeed, I have asked her if she might teach me more of the mystic arts. But none would help another down here, unless it be through the service rendered by slave unto master, or for payment in gold, and where would I find gold? I have not even enough food to eat!" );
   locals[68] = 32;
   locals[69] = 33;
   locals[70] = 0;
   locals[89] = babl_menu( 0, &locals[68] );
   switch ( locals[89] ) {

   case 1:

      goto label_0660;

   break;

   case 2:

      goto label_0665;

   break;

   } // end switch

   label_0660:;

   label_0660:;

   say( "At least I still live. As long as one lives, there is yet hope!" );
   goto label_04f8;

   label_0665:;

   say( "Wouldst thou help me with my spellcasting? 'Tis beyond belief,and yet... If thou couldst bring me a Flam rune, I would be eternally in thy debt!" );
   locals[90] = 36;
   locals[91] = 37;
   locals[92] = 0;
   locals[111] = babl_menu( 0, &locals[90] );
   switch ( locals[111] ) {

   case 1:

      goto label_06a5;

   break;

   case 2:

      goto label_078f;

   break;

   } // end switch

   label_06a5:;

   label_06a5:;

   label_06a5:;

   private[3] = find_barter( 1, &locals[112] );
   locals[112] = 237;
   if ( private[3] == 0 ) {

   } else {

      locals[113] = 1;
      give_ptr_npc( 2, &locals[113], 34 );
      say( "Thank thee! This will help immensely! I cannot think how to repay thee properly, unless... Ah! I have only recently developed a new spell, which I have kept secret from all! Wouldst thou hear of it?" );
      locals[114] = 39;
      locals[115] = 40;
      locals[116] = 0;
      locals[135] = babl_menu( 0, &locals[114] );
      switch ( locals[135] ) {

      case 1:

         goto label_0717;

      break;

      case 2:

      break;

      } // end switch

      say( "Well, do not say I did not try to help thee!" );
      func_0156();
      label_0717:;

      say( "It increases one's prowess in combat. I call it "valor," and its runes are Quas An Corp." );
      locals[136] = 43;
      locals[137] = 0;
      locals[157] = babl_menu( 0, &locals[136] );
      if ( locals[157] == 1 ) {

         locals[158] = 2;
         func_0136( &locals[158] );
      } // end if

   } // end if

   say( "Surely, thou art mistaken. I see no Flam rune." );
   locals[159] = 45;
   locals[160] = 46;
   locals[161] = 0;
   locals[180] = babl_menu( 0, &locals[159] );
   switch ( locals[180] ) {

   case 1:

      goto label_06a5;

   break;

   case 2:

      say( "Very well." );
      goto label_04f8;

   break;

   } // end switch

   label_078f:;

   say( "'Tis no surprise. I thank thee for thy kind thoughts, at least." );
   goto label_04f8;

   label_0794:;

   say( "Few that serve in battle. I know Magic Arrow and Resist Blows, but few spells of the higher circles. I know how to cast a Fireball, but have not the Flam rune that is required for it!" );
   locals[181] = 50;
   locals[182] = 51;
   locals[183] = 52;
   locals[184] = 0;
   locals[202] = babl_menu( 0, &locals[181] );
   switch ( locals[202] ) {

   case 1:

      goto label_07e8;

   break;

   case 2:

      goto label_07ed;

   break;

   case 3:

      goto label_06a5;

   break;

   } // end switch

   label_07e8:;

   say( "I try to avoid provoking people. Many are wary enough of magic to leave me alone, at least." );
   goto label_04f8;

   label_07ed:;

   say( "Nay, whatever treasures may rest below can stay where they are! Fierce monsters dwell there, and few would care to explore their territory. Dorstag took a party down there once, but I doubt he'll ever try that again." );
   locals[203] = 55;
   locals[204] = 56;
   locals[205] = 0;
   locals[224] = babl_menu( 0, &locals[203] );
   switch ( locals[224] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "Why, they were all killed except for him! I hear a giant troll in the deepest cavern did them in. But that's old news around here. 'Tis said a creature born of dark sorcery lurks down there now." );
   locals[225] = 58;
   locals[226] = 0;
   locals[246] = babl_menu( 0, &locals[225] );
   if ( locals[246] == 1 ) {

   } // end if

   say( "Well, don't say I told thee, but something has formed there, something born of the blood of thirteen bold warriors and wizards fallen into the muck, who then rose up into something that looked like a tree, but was not. But come, let's talk of something else." );
   goto label_04f8;

   label_0858:;

   say( "Alas, I am like Zoranthus -- I spent too much of my time studying lesser spells and those not useful in combat. I wish I could fight with my magic as well as Zaria does!" );
   locals[247] = 61;
   locals[248] = 62;
   locals[249] = 63;
   locals[250] = 64;
   locals[251] = 0;
   locals[268] = babl_menu( 0, &locals[247] );
   switch ( locals[268] ) {

   case 1:

      goto label_08c0;

   break;

   case 2:

      goto label_0981;

   break;

   case 3:

      goto label_08c5;

   break;

   case 4:

      goto label_0660;

   break;

   } // end switch

   label_08c0:;

   say( "Would that I could! But down here one is lucky to find enough food to stay alive. What few books might find their way down here are more likely to be used for building fires than aught else." );
   goto label_04f8;

   label_08c5:;

   private[2] = 1;
   say( "Of course! 'Twill be harder for my foes to reach me, giving me more chance to attack them with my small magicks. Thou art clever! Allow me to repay thy advice with a little of mine own." );
   locals[269] = 67;
   locals[270] = 68;
   locals[271] = 69;
   locals[272] = 0;
   locals[290] = babl_menu( 0, &locals[269] );
   switch ( locals[290] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

   break;

   } // end switch

   locals[291] = 121;
   if ( get_quest( 1, &locals[291] ) ) {

      say( "I was never brave enough to steal from Dorstag and his crew, but surely thou who didst best him can do this! Just before his chambers, on the northern wall, there is a secret door! Behind it lies the chamber where he hid his treasure..." );
   } else {

      say( "I am not brave enough to steal from Dorstag, but I think you might be. Just before his chambers, on the northern wall, there is a secret door! Behind it lies the chamber where he hides his treasure..." );
   } // end if

   locals[292] = 72;
   locals[293] = 73;
   locals[294] = 74;
   locals[295] = 0;
   locals[313] = babl_menu( 0, &locals[292] );
   switch ( locals[313] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

   break;

   } // end switch

   say( "Is there anything else thou wouldst speak of?" );
   goto label_04f8;

   label_0981:;

   say( "They say Zoranthus was once the most promising mage of his generation -- he graduated from the Scintillus Academy at 16!  But he dropped out, shut himself away to study his private projects.  Some say he now lives down here, in the lower levels of the Pits, but who knows? None have the courage to venture below." );
   goto label_04f8;

} // end func

void func_0989() {

   say( "Surely, though I have precious little to my name!" );
   func_035a();
   func_0165();
} // end func

conversation #99
string block 0x0e62, name Dorstag

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0575();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[22];

   if ( !func_0058() ) {

   } else {

      say( "Go ahead, run! You're not even worth making a slave of!" );
      locals[1] = 2;
      locals[2] = 3;
      locals[3] = 4;
      locals[4] = 5;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      case 4:

         say( "Ha! Perhaps I'll ask you to lick my boots some day." );
      break;

      } // end switch

      npc_attitude = 2;
      func_0165();
   } // end if

} // end func

void func_03d4() {

   int locals[22];

   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 9;
   locals[4] = 10;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0441();
   break;

   case 2:

      func_048e();
   break;

   case 3:

      func_04db();
   break;

   case 4:

      func_0528();
   break;

   } // end switch

} // end func

void func_0441() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 38;
   locals[2] = 19;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 42;
   locals[5] = 24;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_048e() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 18;
   locals[2] = 38;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 24;
   locals[5] = 44;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_04db() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 21;
   locals[2] = 21;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 23;
   locals[5] = 23;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_0528() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 36;
   locals[2] = 36;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 44;
   locals[5] = 44;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_0575() {

   int locals[250];

   locals[3] = sex( 2, &locals[5], &locals[4] );
   locals[4] = 11;
   locals[5] = 12;
   func_035a();
   locals[6] = 121;
   if ( get_quest( 1, &locals[6] ) ) {

      say( "So, 'tis the @SS3 who beat the famous Dorstag!" );
   } else {

      if ( private[0] == 0 ) {

         say( "Well, I see we have a newcomer to the Pits." );
      } else {

         say( "Again you come to disturb my studies?" );
      } // end if

   } // end if

   label_05bd:;

   label_05bd:;

   label_05bd:;

   label_05bd:;

   locals[1] = get_quest( 1, &locals[7] );
   locals[7] = 121;
   locals[2] = !locals[1];
   locals[29] = 1;
   locals[8] = 16;
   locals[30] = locals[2];
   locals[9] = 17;
   locals[31] = 1;
   locals[10] = 18;
   locals[32] = 1;
   locals[11] = 19;
   locals[33] = locals[1];
   locals[12] = 20;
   locals[13] = 0;
   locals[50] = babl_fmenu( 0, &locals[8], &locals[29] );
   switch ( locals[50] ) {

   case 16:

      goto label_067c;

   break;

   case 17:

      goto label_0773;

   break;

   case 18:

      goto label_0811;

   break;

   case 19:

      func_0165();
   break;

   case 20:

      goto label_08c2;

   break;

   } // end switch

   label_067c:;

   say( "Indeed, those who master the mystic arts are the mightiest of those above. We seldom need prove ourselves in combat, and rarely is a spellcaster condemned to such a place as this. Zoranthus and I are the only ones I know of, save that would-be blunderer Zogith!" );
   locals[51] = 22;
   locals[52] = 23;
   locals[53] = 24;
   locals[54] = 25;
   locals[55] = 0;
   locals[72] = babl_menu( 0, &locals[51] );
   switch ( locals[72] ) {

   case 1:

      goto label_06e4;

   break;

   case 2:

      goto label_06ee;

   break;

   case 3:

      goto label_072e;

   break;

   case 4:

      goto label_06e9;

   break;

   } // end switch

   label_06e4:;

   say( "A master sorcerer in his time, but an eccentric, no feeling for true power, always caught up in his trivial academic researches! He dwells somewhere on the second level, but I have little interest in him." );
   goto label_05bd;

   label_06e9:;

   say( "Why, we mages are a breed apart! The dirty fighters are constantly squabbling of food and trinkets, while I need never eat at all, not since I acquired the QUAS, MANI, and YLEM runes!" );
   goto label_05bd;

   label_06ee:;

   say( "I have passed the doors sealed by the Guardian's own hand -- there is no return, and therefore what is past is of no consequence now. Besides, 'tis my own concern, and none of thine." );
   locals[73] = 29;
   locals[74] = 30;
   locals[75] = 0;
   locals[94] = babl_menu( 0, &locals[73] );
   switch ( locals[94] ) {

   case 1:

      goto label_072e;

   break;

   case 2:

      goto label_072e;

   break;

   } // end switch

   label_072e:;

   label_072e:;

   label_072e:;

   say( "All that is left for me is to rule this festering hole. My powers certainly entitle me to that much, at least. But it seems I have yet to earn more than a grudging respect." );
   locals[95] = 32;
   locals[96] = 33;
   locals[97] = 0;
   locals[116] = babl_menu( 0, &locals[95] );
   switch ( locals[116] ) {

   case 1:

      goto label_076e;

   break;

   case 2:

      goto label_076e;

   break;

   } // end switch

   label_076e:;

   label_076e:;

   say( "Though the power of my magic has slain many in the Arena, still the brutes think less of me because I am a woman. I know what they say of me behind my back, and I'll silence their wagging tongues if I must slay a thousand more! Leave me now, that I might return to my studies." );
   func_0165();
   label_0773:;

   say( "He rules the Pits, at present, for none here hath bested him in combat." );
   locals[117] = 36;
   locals[118] = 37;
   locals[119] = 38;
   locals[120] = 0;
   locals[138] = babl_menu( 0, &locals[117] );
   switch ( locals[138] ) {

   case 1:

      goto label_07cc;

   break;

   case 2:

      goto label_07cc;

   break;

   case 3:

      goto label_07c7;

   break;

   } // end switch

   label_07c7:;

   say( "That may be so. 'Tis no concern of mine." );
   goto label_05bd;

   label_07cc:;

   label_07cc:;

   say( "When the time comes, I and I alone shall slay Dorstag, and rule these pits as my own. 'Tis less than my due, but 'tis the best that I can hope for, now." );
   locals[139] = 41;
   locals[140] = 42;
   locals[141] = 0;
   locals[160] = babl_menu( 0, &locals[139] );
   switch ( locals[160] ) {

   case 1:

      goto label_080c;

   break;

   case 2:

      goto label_080c;

   break;

   } // end switch

   label_080c:;

   label_080c:;

   say( "His skill with that crossbow of his is practically legendary... I must practice the incantation GRAV SANCT POR until I have mastered it thoroughly. Then I will be ready to face him in battle." );
   goto label_05bd;

   label_0811:;

   say( "Thou wouldst imply I'd not do battle because I am a woman? Truly, thou art almost as base as the rest down here. I say almost, for at least thou art bold enough to insult me to my face, where none other dost dare!" );
   locals[161] = 45;
   locals[162] = 46;
   locals[163] = 47;
   locals[164] = 0;
   locals[182] = babl_menu( 0, &locals[161] );
   switch ( locals[182] ) {

   case 1:

      goto label_0865;

   break;

   case 2:

      goto label_08af;

   break;

   case 3:

      goto label_08b4;

   break;

   } // end switch

   label_0865:;

   say( "Such rudeness sets my ears ablaze! I'll see thee die for it - and cut out thy black tongue afterwards to boot. I challenge thee to Arena Combat, thou lowly worm!" );
   locals[183] = 49;
   locals[184] = 50;
   locals[185] = 0;
   locals[204] = babl_menu( 0, &locals[183] );
   switch ( locals[204] ) {

   case 1:

      goto label_08a5;

   break;

   case 2:

      goto label_08aa;

   break;

   } // end switch

   label_08a5:;

   say( "As it is my challenge, then, choose thy Arena." );
   func_03d4();
   label_08aa:;

   say( "Very well, then. I shall strike thee down on this very spot instead!" );
   func_0110();
   label_08af:;

   label_08af:;

   say( "I accept. Thou art bold, and may even provide a modicum of challenge. As it is thy challenge, I choose the Arena of Air for our combat." );
   func_048e();
   label_08b4:;

   say( "For a moment I thought thee bold, to come insult me within mine own chambers. But I see thou art naught but a coward. Leave my sight, for thou art not worthy of my attention." );
   locals[205] = 1;
   func_0136( &locals[205] );
   label_08c2:;

   say( "At last, an end to his ceaseless boasting! 'Tis a relief, though now 'tis thee I must beat, if I am to rule the pits." );
   locals[206] = 56;
   locals[207] = 57;
   locals[208] = 58;
   locals[209] = 0;
   locals[227] = babl_menu( 0, &locals[206] );
   switch ( locals[227] ) {

   case 1:

      goto label_08af;

   break;

   case 2:

      goto label_0916;

   break;

   case 3:

      goto label_091b;

   break;

   } // end switch

   label_0916:;

   label_0916:;

   say( "A pity -- I had hoped one day to prove myself my strength against Dorstag's killer. And yet, 'tis my right to rule here, and I shall accept it gracefully.  Fare thee well, warrior!" );
   func_0147();
   label_091b:;

   say( "Thou'rt a worse braggart than Dorstag was, and I refuse to live under thy rule! The time has come for me to rule this place, or die trying." );
   locals[228] = 61;
   print( 1, &locals[228] );
   say( "Avatar, I challenge thee to trial by arena combat." );
   locals[229] = 63;
   locals[230] = 64;
   locals[231] = 65;
   locals[232] = 0;
   locals[250] = babl_menu( 0, &locals[229] );
   switch ( locals[250] ) {

   case 1:

      goto label_0983;

   break;

   case 2:

   break;

   case 3:

      goto label_0916;

   break;

   } // end switch

   say( "What? The Avatar, a coward? Well, I shall bring thee down on this very spot, and the arena be damned!" );
   func_0110();
   label_0983:;

   say( "Well, then. Choose the arena thou wouldst fight in." );
   func_03d4();
} // end func

conversation #100
string block 0x0e63, name Krilner

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_062f();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[22];

   if ( !func_0058() ) {

   } else {

      say( "Go ahead, run! You're not even worth making a slave of!" );
      locals[1] = 2;
      locals[2] = 3;
      locals[3] = 4;
      locals[4] = 5;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      case 4:

         say( "Ha! Perhaps I'll ask you to lick my boots some day." );
      break;

      } // end switch

      npc_attitude = 2;
      func_0165();
   } // end if

} // end func

void func_03d4() {

   int locals[22];

   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 9;
   locals[4] = 10;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0441();
   break;

   case 2:

      func_048e();
   break;

   case 3:

      func_04db();
   break;

   case 4:

      func_0528();
   break;

   } // end switch

} // end func

void func_0441() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 38;
   locals[2] = 19;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 42;
   locals[5] = 24;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_048e() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 18;
   locals[2] = 38;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 24;
   locals[5] = 44;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_04db() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 21;
   locals[2] = 21;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 23;
   locals[5] = 23;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_0528() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 36;
   locals[2] = 36;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 44;
   locals[5] = 44;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_0575() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_062f() {

   int locals[227];

   func_035a();
   locals[1] = 23;
   if ( get_quest( 1, &locals[1] ) ) {

   } else {

      locals[2] = 24;
      if ( get_quest( 1, &locals[2] ) == 0 ) {

         locals[3] = 22;
         get_quest( 1, &locals[3] ) && !get_quest( 1, &locals[4] );  // expr. has value on stack!
         if ( locals[4] = 65 ) {

            say( "Look who it ain't! Hyah hyah hyah! I heard o' you!" );
         } else {

            locals[5] = 7;
            func_0575( &locals[5] );
            say( "Well, well, a newcomer to the Pits of Carnage. I'd say you must be, anyhow, or you'd know I'm the toughest man here, and I don't even speak to those that haven't won a fight in the Arenas. Get out of here, and I won't kill you for your mistake this time..." );
         } else {

            locals[6] = 22;
            get_quest( 1, &locals[6] ) && !get_quest( 1, &locals[7] );  // expr. has value on stack!
            if ( locals[7] = 65 ) {

            } else {

               locals[8] = 25;
               if ( get_quest( 1, &locals[8] ) ) {

               } else {

                  locals[9] = 129;
                  if ( get_quest( 1, &locals[9] ) > 3 ) {

                  } else {

                     if ( private[0] == 0 ) {

                        say( "So, come to pay your respects, have you?" );
                     } else {

                        say( "What, you again?" );
                     } // end if

                  } // end if

                  label_06f3:;

                  label_06f3:;

                  locals[10] = 15;
                  locals[11] = 16;
                  locals[12] = 17;
                  locals[13] = 18;
                  locals[14] = 0;
                  locals[31] = babl_menu( 0, &locals[10] );
                  switch ( locals[31] ) {

                  case 1:

                     goto label_0758;

                  break;

                  case 2:

                     goto label_07ac;

                  break;

                  case 3:

                     goto label_0833;

                  break;

                  case 4:

                     goto label_0926;

                  break;

                  } // end switch

                  label_0758:;

                  say( "Arrrr, that's a good'un! We don't have no kings down 'ere. I'll tell you, though, when I tell a bloke to do something, he does it! 'Cause nobody can beat me in a fight, and everyone knows it." );
                  locals[32] = 20;
                  locals[33] = 21;
                  locals[34] = 22;
                  locals[35] = 0;
                  locals[53] = babl_menu( 0, &locals[32] );
                  switch ( locals[53] ) {

                  case 1:

                     goto label_0800;

                  break;

                  case 2:

                     goto label_0905;

                  break;

                  case 3:

                     goto label_089b;

                  break;

                  } // end switch

                  label_07ac:;

                  say( "You mean me lucky gem? The bloke that found it wouldn't give it to me when I told him, so I had to cleave his skull open for it. What's it to you?" );
                  locals[54] = 24;
                  locals[55] = 25;
                  locals[56] = 26;
                  locals[57] = 0;
                  locals[75] = babl_menu( 0, &locals[54] );
                  switch ( locals[75] ) {

                  case 1:

                     goto label_0800;

                  break;

                  case 2:

                     goto label_0805;

                  break;

                  case 3:

                     goto label_080a;

                  break;

                  } // end switch

                  label_0800:;

                  label_0800:;

                  say( "Say, you're not bad at flatterin'. Win a few more duels, an' maybe I'll think about letting you be one of my bodyguards someday." );
                  goto label_06f3;

                  label_0805:;

                  say( "This place ain't in no danger I know about. Plenty o' fightin', and the winners get the best of everything, just like it should be. I may be stuck in this dark hole, but at least I'm top dog down 'ere." );
                  goto label_06f3;

                  label_080a:;

                  say( "Ha! My men'll cut you down like a mutt before ya lay a finger on me. Get lost before you stop sounding funny an' start ta get annoying." );
                  locals[76] = 22;
                  get_quest( 1, &locals[76] ) && !get_quest( 1, &locals[77] );  // expr. has value on stack!
                  if ( locals[77] = 65 ) {

                  } else {

                     func_0165();
                     label_0833:;

                     say( "Aye, but who hasn't? It's only because I'm so good with me crossbow, Patatrac, that my sword doesn't drown in blood. I've never lost a fight, ye know. Never." );
                     locals[78] = 31;
                     locals[79] = 32;
                     locals[80] = 33;
                     locals[81] = 34;
                     locals[82] = 0;
                     locals[99] = babl_menu( 0, &locals[78] );
                     switch ( locals[99] ) {

                     case 1:

                        goto label_089b;

                     break;

                     case 2:

                        goto label_08a9;

                     break;

                     case 3:

                        goto label_0905;

                     break;

                     case 4:

                        goto label_090a;

                     break;

                     } // end switch

                     label_089b:;

                     label_089b:;

                     say( "Nobody talks about that, understand? Get out of my sight and don't ever ask me that again." );
                     locals[100] = 1;
                     func_0136( &locals[100] );
                     label_08a9:;

                     say( "If the Duke hadn't sent his men to jump me when I was asleep, an' if there hadn't been ten of them, I'd be up above still. But it don't matter what any of us was before. What's down here is all we'll ever have -- 'cept for the folks like you what get tossed down here every now and then." );
                     locals[101] = 37;
                     locals[102] = 38;
                     locals[103] = 39;
                     locals[104] = 0;
                     locals[122] = babl_menu( 0, &locals[101] );
                     switch ( locals[122] ) {

                     case 1:

                     break;

                     case 2:

                     break;

                     case 3:

                     break;

                     } // end switch

                     say( "Ha ha! You must have been a jester, up above! There ain't no way out o' here once ya fall through them doors, not with the Guardian's seal on'em! Come tell me more jokes sometime, and maybe I'll give you a little food." );
                     locals[123] = 2;
                     func_0136( &locals[123] );
                     label_0905:;

                     label_0905:;

                     say( "You? Don't make me laugh. Yer not worth my time to fight." );
                     func_0165();
                     label_090a:;

                     say( "Feeling cocky, eh? Well, I don't bother dueling these days except with important people. I decline your challenge. Ask me again if you ever amount to anything." );
                     locals[124] = 30;
                     locals[125] = 1;
                     set_quest( 2, &locals[125], &locals[124] );
                     func_0165();
                     label_0926:;

                     say( "Aye, that's where I toss people that bother me with too many questions! Ha ha ha ha!" );
                     locals[126] = 2;
                     func_0136( &locals[126] );
                  } // end if

               } // end if

               say( "It's the poor fool who wants to take my lucky gem away from me! Come to try begging, have you?" );
               locals[127] = 1;
               pause( 1, &locals[127] );
            } // end if

            locals[128] = 45;
            print( 1, &locals[128] );
            locals[129] = 101;
            switch_pic( 1, &locals[129] );
            say( "@GS8 Blog friend!  You better give Blog gem!\m" );
            locals[130] = 99;
            switch_pic( 1, &locals[130] );
            locals[131] = 47;
            print( 1, &locals[131] );
            say( "You! I... I..." );
            locals[132] = 49;
            print( 1, &locals[132] );
            locals[133] = 280 - 1 + 7;
            do_inv_delete( 1, &locals[133] );
            locals[134] = 23;
            locals[135] = 1;
            set_quest( 2, &locals[135], &locals[134] );
            locals[136] = 15;
            locals[137] = 15;
            locals[138] = 10001;
            locals[139] = x_clock( 2, &locals[138], &locals[137] ) + 1;
            x_clock( 2, &locals[139], &locals[136] );
            func_0165();
         } // end if

         say( "So, I hear yer the one that beat Zaria. You must be tougher than I thought. Maybe you're worth fighting a duel with after all." );
      } // end if

      say( "So, I hear yer a pretty tough fella! Gar! Maybe I'll hafta pulverize ya in person, after all!" );
      locals[140] = 52;
      locals[141] = 53;
      locals[142] = 54;
      locals[143] = 0;
      locals[161] = babl_menu( 0, &locals[140] );
      switch ( locals[161] ) {

      case 1:

         goto label_0a47;

      break;

      case 2:

         goto label_0a47;

      break;

      case 3:

         goto label_0aaf;

      break;

      } // end switch

      label_0a47:;

      label_0a47:;

      say( "Come, then. If you challenge me, I give you my word I'll accept this time." );
      locals[162] = 56;
      locals[163] = 57;
      locals[164] = 58;
      locals[165] = 59;
      locals[166] = 0;
      locals[183] = babl_menu( 0, &locals[162] );
      switch ( locals[183] ) {

      case 1:

         goto label_0aaf;

      break;

      case 2:

         goto label_0ab4;

      break;

      case 3:

         goto label_0ab4;

      break;

      case 4:

         goto label_0ab9;

      break;

      } // end switch

      label_0aaf:;

      label_0aaf:;

      say( "Very well, I accept! And since you've given me the choice, I'll face you in the Arena of Fire!" );
      func_04db();
      label_0ab4:;

      label_0ab4:;

      say( "I can see you don't know how to behave honorably, when dealing with real men." );
      func_0165();
      label_0ab9:;

      say( "What!?! You dare make fun of my scar? I won't stand for it!  I challenge you to face me in the Arena!" );
      locals[184] = 63;
      locals[185] = 64;
      locals[186] = 0;
      locals[205] = babl_menu( 0, &locals[184] );
      switch ( locals[205] ) {

      case 1:

         goto label_0af9;

      break;

      case 2:

         goto label_0af9;

      break;

      } // end switch

      label_0af9:;

      label_0af9:;

      label_0af9:;

      say( "Allright. You tricked me into letting you have the choice of Arenas -- but I'll gut you like a pig regardless!" );
      func_03d4();
   } // end if

   say( "Oh, it's you again... the troll-lover!  Just let me catch you in the arena sometime without your boyfriend around to protect you!  We'll see who has the last laugh." );
   locals[206] = 67;
   locals[207] = 68;
   locals[208] = 69;
   locals[209] = 0;
   locals[227] = babl_menu( 0, &locals[206] );
   switch ( locals[227] ) {

   case 1:

   break;

   case 2:

      goto label_0af9;

   break;

   case 3:

      func_0165();
   break;

   } // end switch

   say( "Yeah, well, don't we all." );
   func_0156();
} // end func

conversation #101
string block 0x0e64, name Blog

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_0414();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_0414() {

   int locals[324];

   locals[2] = get_quest( 1, &locals[3] );
   locals[3] = 121;
   locals[1] = !locals[2];
   if ( npc_goal == 10 ) {

      npc_goal = 8;
   } // end if

   if ( private[0] == 0 ) {

   } else {

      locals[4] = 28;
      if ( get_quest( 1, &locals[4] ) ) {

      } else {

         goto label_0460;

         label_0460:;

         say( "I surrender! Aye, you have beaten me in fair combat, and by our customs, you may now claim me as your slave! I promise, master, I will serve thee well!" );
         locals[5] = 28;
         locals[6] = 1;
         set_quest( 2, &locals[6], &locals[5] );
         npc_hp = 25;
         npc_attitude = 3;
         npc_goal = 8;
      } // end if

      private[2] = 0;
      say( "Who art thou? How didst thou appear? Did Dorstag's mages send thee? Or Zaria? It matters not, I suppose, now that my hiding place is discovered, but please, I beg of thee, bold warrior, do not slay me!" );
      locals[7] = 3;
      locals[8] = 4;
      locals[9] = 0;
      locals[28] = babl_menu( 0, &locals[7] );
      switch ( locals[28] ) {

      case 1:

         goto label_04d0;

      break;

      case 2:

         goto label_04d0;

      break;

      } // end switch

      label_04d0:;

      label_04d0:;

      say( "I know I am the poorest warrior here, nay, the poorest anywhere, unfit to appear in the Arenas. And yet, if you let me live, I swear I'll find some way to be useful for thee. Wilt thou take me as thy slave?" );
      locals[29] = 6;
      locals[30] = 7;
      locals[31] = 8;
      locals[32] = 0;
      locals[50] = babl_menu( 0, &locals[29] );
      switch ( locals[50] ) {

      case 1:

         goto label_0524;

      break;

      case 2:

         goto label_0524;

      break;

      case 3:

         goto label_0529;

      break;

      } // end switch

      label_0524:;

      label_0524:;

      say( "Then I have no hope, save that a lucky blow from my dagger may yet save me from untimely death!" );
      func_0110();
      label_0529:;

      say( "Oh, truly thou art the most generous and benevolent master one could ever wish for! I will serve thee as best I can, as long as breath remains within me! Tell me, how may I serve thee first?" );
      locals[51] = 28;
      locals[52] = 1;
      set_quest( 2, &locals[52], &locals[51] );
   } // end if

   locals[53] = 29;
   if ( get_quest( 1, &locals[53] ) == 0 ) {

   } else {

      locals[54] = 30;
      if ( get_quest( 1, &locals[54] ) ) {

      } // end if

   } // end if

   locals[55] = 121;
   if ( get_quest( 1, &locals[55] ) ) {

      say( "Oh greatest of all warriors, slayer of the evil Dorstag, how may I respond to thy least whim?" );
   } else {

      say( "Master, thou hast returned! What may I do for thee?" );
      goto label_0590;

      label_058b:;

      label_058b:;

      say( "How else might I serve thee?" );
   } // end if

   label_0590:;

   label_0590:;

   label_0590:;

   label_0590:;

   locals[77] = locals[1];
   locals[56] = 14;
   locals[78] = 1;
   locals[57] = 15;
   locals[79] = locals[1];
   locals[58] = 16;
   locals[80] = 1;
   locals[59] = 17;
   locals[81] = locals[2];
   locals[60] = 18;
   locals[61] = 0;
   locals[98] = babl_fmenu( 0, &locals[56], &locals[77] );
   switch ( locals[98] ) {

   case 14:

      goto label_0637;

   break;

   case 15:

      goto label_067a;

   break;

   case 16:

      goto label_084a;

   break;

   case 17:

      goto label_08f6;

   break;

   case 18:

      goto label_097d;

   break;

   } // end switch

   label_0637:;

   say( "My name is "Krilner the Coward."" );
   locals[99] = 20;
   locals[100] = 21;
   locals[101] = 0;
   locals[120] = babl_menu( 0, &locals[99] );
   switch ( locals[120] ) {

   case 1:

      goto label_058b;

   break;

   case 2:

      say( "When I arrived here and had to fight in the Arenas, the first warrior I faced said it would amuse him to spare my life if I would swear an oath to always give my name thusly. I'd as soon not chance his wrath by doing otherwise... But surely my problems are beneath your concern. What else wouldst thou know of?" );
      goto label_0590;

   break;

   } // end switch

   label_067a:;

   say( "Truly, art thou from another world than this? But indeed, I am yours to command, and I shall tell whate'er thou dost ask. Ours is a world of violence, where a man's worth (or a woman's, for that matter) is judged solely upon prowess in combat." );
   locals[121] = 24;
   locals[122] = 25;
   locals[123] = 0;
   locals[142] = babl_menu( 0, &locals[121] );
   switch ( locals[142] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "One must always be prepared to defend oneself here.  'Tis considered more proper to challenge a foe first, after which etiquette permits one to simply attack them on the spot if they refuse.  But the only "law" is that which one man may enforce upon another on the point of his sword." );
   private[3] = 1;
   private[4] = 1;
   private[5] = 1;
   goto label_06ca;

   label_06ca:;

   label_06ca:;

   label_06ca:;

   label_06ca:;

   locals[164] = private[3];
   locals[143] = 27;
   locals[165] = private[4];
   locals[144] = 28;
   locals[166] = private[5];
   locals[145] = 29;
   locals[167] = 1;
   locals[146] = 30;
   locals[147] = 0;
   locals[185] = babl_fmenu( 0, &locals[143], &locals[164] );
   switch ( locals[185] ) {

   case 27:

      goto label_0755;

   break;

   case 28:

      goto label_079b;

   break;

   case 29:

      goto label_0840;

   break;

   case 30:

      goto label_058b;

   break;

   } // end switch

   label_0755:;

   private[3] = 0;
   say( "People here enjoy being the first to spot a newcomer to the Pits, especially one who seems weak. They'll kill thee for thy food and weapons as soon as look at thee, if they doubt thy prowess. After two or three victories in the Arenas, thy name will spread, and thou wilt be treated the same as any other." );
   locals[186] = 32;
   locals[187] = 33;
   locals[188] = 0;
   locals[207] = babl_menu( 0, &locals[186] );
   switch ( locals[207] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "Until then, walk always with thy weapon in hand. If thou doth seem prepared for battle, 'tis more likely they will challenge thee rather than attacking outright." );
   goto label_06ca;

   label_079b:;

   private[4] = 0;
   locals[208] = 7;
   func_035a( &locals[208] );
   say( "Thou know not of the Pits of Carnage? Mothers frighten their children with tales of this place... There is but little more law above than here below, that little being the whim of the Guardian. He has ever ruled our land, for he is immortal, and his magic is too strong for any to defeat him in combat. These Pits are the most notorious prison in the land, and the entrance is sealed by his own hand!" );
   locals[209] = 36;
   locals[210] = 37;
   locals[211] = 0;
   locals[230] = babl_menu( 0, &locals[209] );
   switch ( locals[230] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "A savage lot, we have down here -- they've built four Arenas down here for ritual combat. Perhaps if thou dost do well in battle, thou canst earn a place of respect, and partake of what small luxuries are to be had down here...And I will stay by your side, as faithful advisor!" );
   locals[231] = 39;
   locals[232] = 41;
   locals[233] = 43;
   locals[234] = 0;
   locals[252] = babl_menu( 0, &locals[231] );
   switch ( locals[252] ) {

   case 1:

      say( "Ha! Would that such a thing were possible..." );
   break;

   case 2:

      say( "Time will reveal all. What else would thou know of?" );
   break;

   case 3:

      say( "I humbly beg your pardon, master! Please, let me aid thee more that I might earn thy forgiveness!" );
   break;

   } // end switch

   goto label_06ca;

   label_0840:;

   private[5] = 0;
   say( "In truth, master, it has not been easy. I was born a weakling in a world of warriors, with neither the skill nor the stomach for battle. I was fortunate that the first who fought me down here saw fit to spare my life. Since then I have hidden in this small chamber, scavenging what small scraps of food I might." );
   goto label_06ca;

   label_084a:;

   say( "It must be the gem Dorstag carries thou dost speak of. He laid claim to it as soon as it was found, for he is the mightiest warrior here, and none dare deny him anything. You'd best give up hope of acquiring anything he covets." );
   locals[253] = 47;
   locals[254] = 48;
   locals[255] = 0;
   locals[274] = babl_menu( 0, &locals[253] );
   switch ( locals[274] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "None has ever defeated Dorstag in battle! His skill with the crossbow is legendary. He's beaten many in the Arenas, but only keeps the strongest warriors for his slaves. With all the bodyguards he keeps, you could never hope to attack him in his quarters. If you must fight him, challenge him to an Arena duel.  Will there be anything else, master?" );
   locals[275] = 29;
   locals[276] = 1;
   set_quest( 2, &locals[276], &locals[275] );
   locals[277] = 30;
   if ( get_quest( 1, &locals[277] ) ) {

   } else {

   } // end if

   locals[278] = 50;
   locals[279] = 52;
   locals[280] = 0;
   locals[299] = babl_menu( 0, &locals[278] );
   switch ( locals[299] ) {

   case 1:

      say( "There is one way. Zaria is, perhaps, the second most feared adversary down here, for her magical powers are very great. She has not dared challenge Dorstag yet. If thou were to defeat her, Dorstag might consider thee a threat to his power, and be forced to face thee in the arena." );
   break;

   case 2:

      say( "I will answer them as best I might." );
   break;

   } // end switch

   goto label_0590;

   label_08f6:;

   if ( private[2] == 1 ) {

      func_0165();
   } // end if

   private[2] = 1;
   say( "Farewell, master. Oh, and if any wouldst slay me, thou wilt seek to protect thy property, wilt thou not?" );
   locals[300] = 55;
   locals[301] = 57;
   locals[302] = 59;
   locals[303] = 0;
   locals[321] = babl_menu( 0, &locals[300] );
   switch ( locals[321] ) {

   case 1:

      say( "Truly, thou art kind and generous!" );
      locals[322] = 3;
      func_0136( &locals[322] );
   break;

   case 2:

      say( "Oh thank you, master, for even considering it!" );
      locals[323] = 3;
      func_0136( &locals[323] );
   break;

   case 3:

      say( "I beg thy pardon for my presumption. I will strive to serve thee more humbly." );
      locals[324] = 1;
      func_0136( &locals[324] );
   break;

   } // end switch

   label_097d:;

   say( "Oh, greatest of all masters, please forgive thy humble servant!" );
   locals[2] = 0;
   goto label_0590;

} // end func

conversation #102
string block 0x0e65, name warrior

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[607];

   locals[1] = 63;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   private[6] = 0;
   locals[3] = 121;
   if ( get_quest( 1, &locals[3] ) && dungeon_level == 57 ) {

      say( "Me like it here! May-be me find some hu-mans, play game!" );
      func_0165();
   } // end if

   locals[4] = 23;
   if ( get_quest( 1, &locals[4] ) == 1 ) {

   } else {

      if ( private[0] == 0 ) {

         private[8] = 0;
         private[8] = 1;
         private[7] = 0;
      } else {

      } // end if

      say( "Oh, is you! Who you?" );
      locals[5] = 3;
      locals[6] = 4;
      locals[7] = 5;
      locals[8] = 0;
      locals[26] = babl_menu( 0, &locals[5] );
      switch ( locals[26] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      label_0419:;

      say( "Huh? You talk fast. Say again slow!" );
      locals[27] = 7;
      locals[28] = 8;
      locals[29] = 9;
      locals[30] = 10;
      locals[31] = 0;
      locals[48] = babl_menu( 0, &locals[27] );
      switch ( locals[48] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      case 4:

         goto label_0419;

      break;

      } // end switch

      say( "My name Blog. Blog good troll, you bet!" );
      locals[49] = 12;
      locals[50] = 13;
      locals[51] = 14;
      locals[52] = 0;
      locals[70] = babl_menu( 0, &locals[49] );
      switch ( locals[70] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      say( "Blog like to col-lect rocks, like to play game!  You know how to play game?" );
      locals[71] = 16;
      locals[72] = 17;
      locals[73] = 18;
      locals[74] = 0;
      locals[92] = babl_menu( 0, &locals[71] );
      switch ( locals[92] ) {

      case 1:

         goto label_051d;

      break;

      case 2:

         goto label_0576;

      break;

      case 3:

         goto label_05b9;

      break;

      } // end switch

      label_051d:;

      say( "Oh. That bad. How we play game then?" );
      locals[93] = 20;
      locals[94] = 22;
      locals[95] = 24;
      locals[96] = 0;
      locals[114] = babl_menu( 0, &locals[93] );
      switch ( locals[114] ) {

      case 1:

         say( "Oh, you real smart -- that good i-dea!" );
      break;

      case 2:

         say( "You not know. Me not know. Hey, you just like me!" );
      break;

      case 3:

         say( "Poor you, life dull with no game." );
      break;

      } // end switch

      goto label_05fa;

      label_0576:;

      say( "You want to play game now?" );
      locals[115] = 27;
      locals[116] = 28;
      locals[117] = 0;
      locals[136] = babl_menu( 0, &locals[115] );
      switch ( locals[136] ) {

      case 1:

         goto label_0ab2;

      break;

      case 2:

         say( "Oh, you want to play la-ter. O. K." );
      break;

      } // end switch

      goto label_05fa;

      label_05b9:;

      say( "What game? The game, Blog ask if you know how to play it." );
      locals[137] = 31;
      locals[138] = 32;
      locals[139] = 0;
      locals[158] = babl_menu( 0, &locals[137] );
      switch ( locals[158] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      say( "Oh, Blog know now - you make joke! Ha ha ha, fun-ny joke! You act like you not know game! If you want to play, Blog have rocks for game." );
      goto label_05fa;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      label_05fa:;

      locals[180] = 1;
      locals[159] = 34;
      locals[181] = private[8];
      locals[160] = 35;
      locals[182] = 1;
      locals[161] = 36;
      locals[183] = 1;
      locals[162] = 37;
      locals[184] = private[7];
      locals[163] = 38;
      locals[164] = 0;
      locals[201] = babl_fmenu( 0, &locals[159], &locals[180] );
      switch ( locals[201] ) {

      case 34:

         goto label_06a5;

      break;

      case 35:

         goto label_0942;

      break;

      case 36:

         goto label_07a4;

      break;

      case 37:

         goto label_06a0;

      break;

      case 38:

         goto label_0ab2;

      break;

      } // end switch

      label_06a0:;

      say( "You come back, we play game!" );
      func_0165();
      label_06a5:;

      locals[202] = 22;
      if ( get_quest( 1, &locals[202] ) == 1 ) {

      } else {

         say( "If friend of Blog need help, Blog help friend. You not friend. Blog not e-ven know what gem look like." );
         locals[203] = 41;
         locals[204] = 42;
         locals[205] = 0;
         locals[224] = babl_menu( 0, &locals[203] );
         switch ( locals[224] ) {

         case 1:

            goto label_06fb;

         break;

         case 2:

            goto label_0700;

         break;

         } // end switch

         label_06fb:;

         say( "You ask Blog things, Blog tell you things - is like new kind of game!" );
         goto label_05fa;

         label_0700:;

         say( "Oh, Blog find bright rocks once in box. Box have lock, Blog pull real hard to o-pen. Full of bright rocks. Too shi-ny to play game with, so Blog throw them all a-way." );
      } // end if

      say( "Okay. You Blog friend, Blog help friend. Take a-ny rock in room!" );
      locals[225] = 46;
      locals[226] = 48;
      locals[227] = 0;
      locals[246] = babl_menu( 0, &locals[225] );
      switch ( locals[246] ) {

      case 1:

         say( "You wel-come." );
         goto label_05fa;

      break;

      case 2:

      break;

      } // end switch

      say( "Pa-ci-fic? Where Blog find that kind?" );
      locals[247] = 50;
      locals[248] = 51;
      locals[249] = 52;
      locals[250] = 0;
      locals[268] = babl_menu( 0, &locals[247] );
      switch ( locals[268] ) {

      case 1:

         goto label_079a;

      break;

      case 2:

         goto label_079f;

      break;

      case 3:

         goto label_079f;

      break;

      } // end switch

      label_079a:;

      say( "If you not know, Blog must tell you. Too bad Blog not know. How can Blog tell what Blog not know?" );
      goto label_05fa;

      label_079f:;

      label_079f:;

      say( "You go ask for shi-ny rock. If they not give, Blog come help friend! Go now, Blog think this im-por-tant!" );
      func_0165();
      label_07a4:;

      say( "Play game with rocks, so Blog like rocks! Get lots of rocks. Too big to play game with. Blog put small rocks there, big rocks there, not-big not-small rocks there! Is good, yes?" );
      locals[269] = 56;
      locals[270] = 57;
      locals[271] = 58;
      locals[272] = 59;
      locals[273] = 0;
      locals[290] = babl_menu( 0, &locals[269] );
      switch ( locals[290] ) {

      case 1:

         goto label_080c;

      break;

      case 2:

         goto label_0811;

      break;

      case 3:

         goto label_0816;

      break;

      case 4:

         goto label_0842;

      break;

      } // end switch

      label_080c:;

      say( "You like rocks just like Blog! Now you go get rocks to keep too, Blog know it!" );
      goto label_05fa;

      label_0811:;

      say( "Blog go to many lands, but Blog not bring rocks from most. Not fit through di-men-sion-al in-ter-face. Walls here made of rocks. Blog break rocks loose with hands. Blog strong!" );
      goto label_05fa;

      label_0816:;

      say( "Give Blog rock, Blog tell you if it good rock!" );
      locals[291] = 63;
      locals[292] = 0;
      locals[312] = babl_menu( 0, &locals[291] );
      if ( locals[312] == 1 ) {

      } else {

         label_0842:;

         say( "Blog like fight too! But when Blog fight, some get hurt real bad. So Blog on-ly fight if they fight Blog first." );
      } // end if

      label_0847:;

      label_0847:;

      private[3] = find_barter( 1, &locals[313] );
      locals[313] = 173;
      if ( private[3] == 0 ) {

      } else {

         locals[314] = 1;
         give_ptr_npc( 2, &locals[314], 34 );
         say( "This good rock! Same as game rocks but dif-fer-ent! Some day Blog think real hard, think up new game to play with all three! You big friend of Blog now!" );
         locals[315] = 22;
         locals[316] = 1;
         set_quest( 2, &locals[316], &locals[315] );
         func_0165();
      } // end if

      locals[317] = 172;
      (find_barter( 1, &locals[317] ) || find_barter( 1, &locals[318] ));  // expr. has value on stack!
      if ( locals[318] = 171 ) {

         say( "Hey! That nice rock for game! You want play game?" );
         locals[319] = 67;
         locals[320] = 68;
         locals[321] = 0;
         locals[340] = babl_menu( 0, &locals[319] );
         switch ( locals[340] ) {

         case 1:

         break;

         case 2:

            say( "Rrrr." );
            goto label_05fa;

         break;

         } // end switch

         if ( private[7] ) {

         } else {

         } // end if

         say( "That no good for game! You keep." );
         locals[341] = 71;
         locals[342] = 72;
         locals[343] = 0;
         locals[362] = babl_menu( 0, &locals[341] );
         switch ( locals[362] ) {

         case 1:

            goto label_0847;

         break;

         case 2:

            say( "Oh well. Blog use same rocks as be-fore." );
            goto label_05fa;

         break;

         } // end switch

         label_0942:;

         say( "Game of White-Rock Black-Rock! Great fun! Too bad bats and spi-ders too dumb to play, or Blog play all the time! They good to eat, though." );
         locals[363] = 75;
         locals[364] = 76;
         locals[365] = 77;
         locals[366] = 78;
         locals[367] = 0;
         locals[384] = babl_menu( 0, &locals[363] );
         switch ( locals[384] ) {

         case 1:

            goto label_09aa;

         break;

         case 2:

            goto label_09af;

         break;

         case 3:

            goto label_09b1;

         break;

         case 4:

            goto label_0aad;

         break;

         } // end switch

         label_09aa:;

         say( "Blog eat what Blog can find. Find good stuff some times. Blog try eat rock once, not taste good!" );
         goto label_05fa;

         label_09af:;

         goto label_0ab2;

         label_09b1:;

         say( "Game not hard! One of us play, must pick rock. Must pick good to win. If you win, me lose. If you lose, me win! You got that?" );
         locals[385] = 81;
         locals[386] = 82;
         locals[387] = 83;
         locals[388] = 0;
         locals[406] = babl_menu( 0, &locals[385] );
         switch ( locals[406] ) {

         case 1:

         break;

         case 2:

         break;

         case 3:

         break;

         } // end switch

         say( "If pick white rock, then win! Good to pick white rock!" );
         locals[407] = 85;
         locals[408] = 86;
         locals[409] = 0;
         locals[428] = babl_menu( 0, &locals[407] );
         switch ( locals[428] ) {

         case 1:

         break;

         case 2:

         break;

         } // end switch

         say( "But wait - here trick-y part! If pick black rock, then lose! Must try not to pick black rock! Now Blog done teach you rules." );
         locals[429] = 88;
         locals[430] = 89;
         locals[431] = 90;
         locals[432] = 91;
         locals[433] = 0;
         locals[450] = babl_menu( 0, &locals[429] );
         switch ( locals[450] ) {

         case 1:

            goto label_0ab2;

         break;

         case 2:

            goto label_0aa3;

         break;

         case 3:

            goto label_0aa3;

         break;

         case 4:

            goto label_0aa8;

         break;

         } // end switch

         label_0aa3:;

         label_0aa3:;

         say( "It e-ven more fun than big big fight!" );
         goto label_05fa;

         label_0aa8:;

         say( "Blog smart, you know. Blog e-ven win game some times!" );
         goto label_05fa;

         label_0aad:;

         say( "No, that true? Blog must think hard, how that can be. You go now, let Blog think hard!" );
         func_0165();
      } // end if

      label_0ab2:;

      label_0ab2:;

      label_0ab2:;

      label_0ab2:;

      label_0ab2:;

      label_0ab2:;

      say( "Good good, we play game now!" );
      label_0ab5:;

      private[7] = 1;
      private[8] = 0;
      private[2] = random( 1, &locals[451] );
      locals[451] = 3;
      if ( private[2] == 2 ) {

      } else {

         private[2] = random( 1, &locals[452] );
         locals[452] = 7;
         locals[453] = private[2];
         if ( 1 == locals[453] ) {

            say( "Blog play so much, it more fair if you go first." );
         } else {

            if ( 2 == locals[453] ) {

               say( "Blog let you go first this time." );
            } else {

               if ( 3 == locals[453] ) {

                  say( "Blog think too hard. This time you pick rock." );
               } else {

                  if ( 4 == locals[453] ) {

                     say( "Who go now? Oh yes, you go." );
                  } else {

                     if ( 5 == locals[453] ) {

                        say( "Not think it Blog turn now. You take turn." );
                     } else {

                        if ( 6 == locals[453] ) {

                           say( "Who go last? Blog not know. You go now." );
                        } else {

                           if ( 7 == locals[453] ) {

                              say( "Blog hold rocks, so you pick." );
                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

      locals[454] = 103;
      locals[455] = 0;
      locals[475] = babl_menu( 0, &locals[454] );
      if ( locals[475] == 1 ) {

      } // end if

      private[3] = find_barter( 1, &locals[476] );
      locals[476] = 172;
      private[4] = find_barter( 1, &locals[477] );
      locals[477] = 171;
      private[5] = find_barter( 1, &locals[478] );
      locals[478] = 173;
      if ( private[5] != 0 ) {

         say( "OOOooooooo.  Look grey rock!  Be-yoo-ti-ful!  Me have?" );
         locals[479] = 105;
         locals[480] = 106;
         locals[481] = 0;
         locals[500] = babl_menu( 0, &locals[479] );
         switch ( locals[500] ) {

         case 1:

            goto label_0847;

         break;

         case 2:

         break;

         } // end switch

         say( "You no fun at all.  Me no play with you." );
         func_0165();
      } // end if

      if ( private[3] == 0 && private[4] == 0 ) {

         say( "Wait, you no fool Blog! There no rock there! You go find rock, then we play." );
      } else {

         if ( private[3] != 0 && private[4] != 0 ) {

            say( "No fair, you not pick both rocks! Try a-gain!" );
         } else {

            if ( private[3] ) {

            } else {

               if ( private[4] ) {

               } // end if

            } // end if

            locals[501] = 111;
            if ( get_quest( 1, &locals[501] ) == 0 ) {

               locals[502] = 111;
               locals[503] = 1;
               set_quest( 2, &locals[503], &locals[502] );
               say( "Wow, you luck-y or what?" );
            } else {

               private[2] = random( 1, &locals[504] );
               locals[504] = 10;
               locals[505] = private[2];
               if ( 1 == locals[505] ) {

                  say( "Hey, you win a-gain! How you do that?" );
               } else {

                  if ( 2 == locals[505] ) {

                     say( "You play this game be-fore, right?" );
                  } else {

                     if ( 3 == locals[505] ) {

                        say( "How you pick white rock so good?" );
                     } else {

                        if ( 4 == locals[505] ) {

                           say( "If Blog not see you pick, Blog think you cheat!" );
                        } else {

                           if ( 5 == locals[505] ) {

                              say( "You pick good, must be smart like Blog!" );
                           } else {

                              if ( 6 == locals[505] ) {

                                 say( "Ha! You not pick so good next game!" );
                              } else {

                                 if ( 7 == locals[505] ) {

                                    say( "White rock - that mean you win, right?" );
                                 } else {

                                    if ( 8 == locals[505] ) {

                                       say( "Oh, that same rock Blog would pick too!" );
                                    } else {

                                       if ( 9 == locals[505] ) {

                                          say( "You play too good for Blog." );
                                       } else {

                                          if ( 10 == locals[505] ) {

                                             say( "Blog wish Blog could pick like that!" );
                                          } // end if

                                       } // end if

                                    } // end if

                                 } // end if

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

               goto label_0f1a;

               private[2] = random( 1, &locals[506] );
               locals[506] = 10;
               locals[507] = private[2];
               if ( 1 == locals[507] ) {

                  say( "Ha, ha! Game more hard than you think!" );
               } else {

                  if ( 2 == locals[507] ) {

                     say( "Not feel bad, game is hard to learn." );
                  } else {

                     if ( 3 == locals[507] ) {

                        say( "You lose, so what Blog do? Oh, Blog win!" );
                     } else {

                        if ( 4 == locals[507] ) {

                           say( "Ho, ho! Blog let you go first lots!" );
                        } else {

                           if ( 5 == locals[507] ) {

                              say( "Play game more, some day you win like Blog!" );
                           } else {

                              if ( 6 == locals[507] ) {

                                 say( "Blog have fun when you play game!" );
                              } else {

                                 if ( 7 == locals[507] ) {

                                    say( "He, he! You pick wrong rock!" );
                                 } else {

                                    if ( 8 == locals[507] ) {

                                       say( "Oh, that same rock Blog would pick too!" );
                                    } else {

                                       if ( 9 == locals[507] ) {

                                          say( "Wait! Blog fig-ure out mean-ing of life! It... It... No, Blog for-get now. Oh well." );
                                       } else {

                                          if ( 10 == locals[507] ) {

                                             say( "You lose, Blog win! Life good." );
                                          } // end if

                                       } // end if

                                    } // end if

                                 } // end if

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

               private[6] = private[6] + 1;
               if ( private[6] == 1 ) {

                  say( "Blog like play-ing with you!" );
               } // end if

               if ( private[6] == 2 ) {

                  say( "This great fun! You like too?" );
                  locals[508] = 133;
                  locals[509] = 134;
                  locals[510] = 0;
                  locals[529] = babl_menu( 0, &locals[508] );
                  switch ( locals[529] ) {

                  case 1:

                     goto label_0df4;

                  break;

                  case 2:

                  break;

                  } // end switch

                  say( "You play more! Soon you like!" );
                  goto label_0f1a;

                  label_0df4:;

                  say( "You like? Me like too!" );
               } // end if

               if ( private[6] == 3 ) {

                  say( "Hey, Blog like play game with you, Blog have big fun. You big friend Blog now! You need help, Blog be friend for you too!" );
                  locals[530] = 22;
                  locals[531] = 1;
                  set_quest( 2, &locals[531], &locals[530] );
               } // end if

            } // end if

            private[2] = random( 1, &locals[532] );
            locals[532] = 2;
            if ( private[2] == 2 ) {

            } else {

               private[2] = random( 1, &locals[533] );
               locals[533] = 6;
               locals[534] = private[2];
               if ( 1 == locals[534] ) {

                  say( "Blog pick black rock. Oh no, Blog lose again!" );
               } else {

                  if ( 2 == locals[534] ) {

                     say( "Blog pick black rock. Oops, why Blog do that?" );
                  } else {

                     if ( 3 == locals[534] ) {

                        say( "Blog pick white - no, black - no, white - pick black! Oh darn, Blog lose!" );
                     } else {

                        if ( 4 == locals[534] ) {

                           say( "Blog pick black rock. Ha ha, me make you win!" );
                        } else {

                           if ( 5 == locals[534] ) {

                              say( "Blog pick black rock. Blog hate when that happen!" );
                           } else {

                              if ( 6 == locals[534] ) {

                                 say( "Blog try to pick rock you would. Oops, got black rock!" );
                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

            private[2] = random( 1, &locals[535] );
            locals[535] = 6;
            locals[536] = private[2];
            if ( 1 == locals[536] ) {

               say( "Blog pick white rock. See, me tell you Blog smart!" );
            } else {

               if ( 2 == locals[536] ) {

                  say( "Blog close eyes this time. Hey, lucky Blog, pick white rock!" );
               } else {

                  if ( 3 == locals[536] ) {

                     say( "Blog pick white rock. Blog so hap-py!" );
                  } else {

                     if ( 4 == locals[536] ) {

                        say( "Blog pick white rock. Ho ho, Blog use stra-te-gy!" );
                     } else {

                        if ( 5 == locals[536] ) {

                           say( "Blog pick white rock. Blog have too much fun now!" );
                        } else {

                           if ( 6 == locals[536] ) {

                              say( "Blog pick white rock. But what it mean in big scheme of things?" );
                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

            if ( private[6] != 2 ) {

               private[6] = private[6] + 1;
            } // end if

         } // end if

         label_0f1a:;

         label_0f1a:;

         say( "You want play game again?" );
         locals[537] = 151;
         locals[538] = 152;
         locals[539] = 153;
         locals[540] = 0;
         locals[558] = babl_menu( 0, &locals[537] );
         switch ( locals[558] ) {

         case 1:

            goto label_0ab2;

         break;

         case 2:

            goto label_0f6e;

         break;

         case 3:

            goto label_0fb3;

         break;

         } // end switch

         label_0f6e:;

         say( "Oh, just play one more game, okay?" );
         locals[559] = 155;
         locals[560] = 156;
         locals[561] = 0;
         locals[580] = babl_menu( 0, &locals[559] );
         switch ( locals[580] ) {

         case 1:

            goto label_0ab2;

         break;

         case 2:

            goto label_0fae;

         } // end if

      break;

      } // end switch

      label_0fae:;

      say( "Well, you play more some time! Blog like to play game!" );
      goto label_05fa;

      label_0fb3:;

      say( "No time bet-ter than right now... So we play a-gain now!" );
      goto label_0ab5;

      locals[581] = 22;
      if ( get_quest( 1, &locals[581] ) == 1 ) {

         say( "Oh, friend back!" );
      } else {

         say( "Oh, you back!" );
      } // end if

   } // end if

   say( "Here, friend, take gem. Good luck with rest of ad-ven-tures!" );
   locals[582] = 280 - 1 + 7;
   take_from_npc( 1, &locals[582] );
   locals[583] = 162;
   locals[584] = 0;
   locals[604] = babl_menu( 0, &locals[583] );
   if ( locals[604] == 1 ) {

   } // end if

   locals[605] = 1000;
   x_exp( 1, &locals[605] );
   locals[606] = 121;
   locals[607] = 1;
   set_quest( 2, &locals[607], &locals[606] );
   func_0165();
} // end func

conversation #103
string block 0x0e66, name Jospur

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_062f();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[22];

   if ( !func_0058() ) {

   } else {

      say( "Go ahead, run! You're not even worth making a slave of!" );
      locals[1] = 2;
      locals[2] = 3;
      locals[3] = 4;
      locals[4] = 5;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      case 4:

         say( "Ha! Perhaps I'll ask you to lick my boots some day." );
      break;

      } // end switch

      npc_attitude = 2;
      func_0165();
   } // end if

} // end func

void func_03d4() {

   int locals[22];

   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 9;
   locals[4] = 10;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0441();
   break;

   case 2:

      func_048e();
   break;

   case 3:

      func_04db();
   break;

   case 4:

      func_0528();
   break;

   } // end switch

} // end func

void func_0441() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 38;
   locals[2] = 19;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 42;
   locals[5] = 24;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_048e() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 18;
   locals[2] = 38;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 24;
   locals[5] = 44;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_04db() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 21;
   locals[2] = 21;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 23;
   locals[5] = 23;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_0528() {

   int locals[5];

   func_0042();
   npc_attitude = 0;
   npc_goal = 5;
   locals[1] = 36;
   locals[2] = 36;
   locals[3] = 57;
   teleport_player( 3, &locals[3], &locals[2], &locals[1] );
   locals[4] = 44;
   locals[5] = 44;
   teleport_talker( 2, &locals[5], &locals[4] );
   func_0165();
} // end func

void func_0575() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_062f() {

   int locals[605];

   locals[20] = get_quest( 1, &locals[22] );
   locals[22] = 121;
   if ( npc_goal == 10 ) {

      npc_goal = 8;
   } // end if

   func_035a();
   locals[23] = 129;
   if ( get_quest( 1, &locals[23] ) > 4 ) {

   } else {

      goto label_06cb;

      if ( private[0] == 0 ) {

      } // end if

      locals[24] = 7;
      func_0575( &locals[24] );
      say( "Well, what have we here? A newcomer to the Pits, I fancy!" );
      locals[25] = 12;
      locals[26] = 14;
      locals[27] = 0;
      locals[46] = babl_menu( 0, &locals[25] );
      switch ( locals[46] ) {

      case 1:

         say( "Just as I thought! " );
      break;

      case 2:

         say( "Nay, there are few of us down here, and we all know each other. You're a newcomer. " );
      break;

      } // end switch

      say( "And 'tis lucky for me I found you first! Whatever food and equipment you've brought with ye, well, I fancy it'll be mine. No need to slay you in the Arena -- I think I'll just do it here, and Dorstag'll never take his cut!" );
      func_0110();
      label_06cb:;

      locals[47] = 15;
      locals[48] = 9999;
      if ( x_skills( 2, &locals[48], &locals[47] ) > 10 ) {

         locals[1] = random( 1, &locals[49] ) + 1;
         locals[49] = 3;
      } else {

         locals[1] = random( 1, &locals[50] );
         locals[50] = 4;
      } // end if

      locals[51] = locals[1];
      if ( 1 == locals[51] ) {

      } else {

         if ( 2 == locals[51] ) {

         } else {

            if ( 3 == locals[51] ) {

            } else {

               if ( 4 == locals[51] ) {

                  goto label_0b40;

               } // end if

            } // end if

            locals[52] = 15;
            locals[53] = 9999;
            if ( x_skills( 2, &locals[53], &locals[52] ) > 15 ) {

               locals[1] = random( 1, &locals[54] ) + 1;
               locals[54] = 3;
            } else {

               locals[1] = random( 1, &locals[55] );
               locals[55] = 4;
            } // end if

            locals[56] = locals[1];
            if ( 1 == locals[56] ) {

            } else {

               if ( 2 == locals[56] ) {

               } else {

                  if ( 3 == locals[56] ) {

                  } else {

                     if ( 4 == locals[56] ) {

                        goto label_0ebe;

                     } // end if

                  } // end if

                  locals[57] = 17;
                  print( 1, &locals[57] );
                  locals[58] = 18;
                  locals[59] = 19;
                  locals[60] = 20;
                  locals[61] = 21;
                  locals[62] = 0;
                  locals[79] = babl_menu( 0, &locals[58] );
                  switch ( locals[79] ) {

                  case 1:

                     goto label_0838;

                  break;

                  case 2:

                     goto label_083d;

                  break;

                  case 3:

                     goto label_0842;

                  break;

                  case 4:

                     goto label_0847;

                  break;

                  } // end switch

                  label_0838:;

                  say( "And who are you to say hail to me? " );
                  goto label_084a;

                  label_083d:;

                  say( "Could be day or night, for all we can tell -- and there's precious little good about it! " );
                  goto label_084a;

                  label_0842:;

                  say( "Aye, if thy question is about how long thou hast left to live, my sword has an answer for that!" );
                  goto label_084a;

                  label_0847:;

                  say( "That's more than I can say for you. " );
                  label_084a:;

                  label_084a:;

                  label_084a:;

                  say( "You annoy me, and I've a notion to separate your head from your body. I challenge you to fight me in the Arena!" );
                  label_084d:;

                  label_084d:;

                  locals[80] = 27;
                  locals[81] = 28;
                  locals[82] = 29;
                  locals[83] = 0;
                  locals[101] = babl_menu( 0, &locals[80] );
                  switch ( locals[101] ) {

                  case 1:

                     goto label_089e;

                  break;

                  case 2:

                     goto label_1064;

                  break;

                  case 3:

                     goto label_1064;

                  break;

                  } // end switch

                  label_089e:;

                  say( "Then methinks I'll just strike thee dead right here and save some time!" );
                  func_0110();
               } // end if

            } // end if

            locals[102] = 31;
            print( 1, &locals[102] );
            locals[103] = 32;
            locals[104] = 33;
            locals[105] = 34;
            locals[106] = 35;
            locals[107] = 0;
            locals[124] = babl_menu( 0, &locals[103] );
            switch ( locals[124] ) {

            case 1:

               goto label_0916;

            break;

            case 2:

               goto label_091b;

            break;

            case 3:

               goto label_0920;

            break;

            case 4:

               goto label_0925;

            break;

            } // end switch

            label_0916:;

            say( "Pfah." );
            goto label_0928;

            label_091b:;

            say( "Bah. Good for you, maybe." );
            goto label_0928;

            label_0920:;

            say( "Listen, stranger, people do better if they mind their own business down here, get it?" );
            goto label_0928;

            label_0925:;

            say( "Hah. If that's meant as flattery, I've heard better!" );
            label_0928:;

            label_0928:;

            label_0928:;

            locals[146] = 1;
            locals[125] = 40;
            locals[147] = 1;
            locals[126] = 41;
            locals[148] = locals[20];
            locals[127] = 42;
            locals[149] = 1;
            locals[128] = 43;
            locals[129] = 0;
            locals[167] = babl_fmenu( 0, &locals[125], &locals[146] );
            switch ( locals[167] ) {

            case 40:

               goto label_09b1;

            break;

            case 41:

               goto label_0a3b;

            break;

            case 42:

               goto label_0a7b;

            break;

            case 43:

               goto label_0ad4;

            break;

            } // end switch

            label_09b1:;

            label_09b1:;

            say( "And who's going to teach me? Thou?" );
            locals[168] = 45;
            locals[169] = 46;
            locals[170] = 0;
            locals[189] = babl_menu( 0, &locals[168] );
            switch ( locals[189] ) {

            case 1:

               goto label_09f1;

            break;

            case 2:

               goto label_09f6;

            break;

            } // end switch

            label_09f1:;

            say( "Well, methinks I'll teach ye how to address thy betters. I challenge ye to mortal combat in the Arena!" );
            goto label_084d;

            label_09f6:;

            say( "Art thou challenging me to a duel?" );
            locals[190] = 49;
            locals[191] = 50;
            locals[192] = 0;
            locals[211] = babl_menu( 0, &locals[190] );
            switch ( locals[211] ) {

            case 1:

               goto label_0fb7;

            break;

            case 2:

               goto label_0a36;

            break;

            } // end switch

            label_0a36:;

            say( "Well then, coward, I challenge thee instead!" );
            goto label_084d;

            label_0a3b:;

            say( "He's the head man down here. What's it to ya?" );
            locals[212] = 53;
            locals[213] = 54;
            locals[214] = 0;
            locals[233] = babl_menu( 0, &locals[212] );
            switch ( locals[233] ) {

            case 1:

               func_0165();
            break;

            case 2:

               goto label_09b1;

            break;

            } // end switch

            label_0a7b:;

            say( "You lookin' for a fight with me? That'll give ya the chance to see the Arena first hand! 'Course it'll be the last thing you'll ever see..." );
            locals[234] = 56;
            locals[235] = 57;
            locals[236] = 58;
            locals[237] = 0;
            locals[255] = babl_menu( 0, &locals[234] );
            switch ( locals[255] ) {

            case 1:

               func_0165();
            break;

            case 2:

               goto label_0acf;

            break;

            case 3:

               goto label_0fb7;

            break;

            } // end switch

            label_0acf:;

            say( "Well, if you wish to take the coward's choice, so be it." );
            func_0165();
            label_0ad4:;

            locals[256] = 7;
            func_0575( &locals[256] );
            say( "Never heard of the Pits of Carnage before they threw ya down here? Ha, that's a rich one! Best watch yer step down here, or you might lose your feet! And don't think o' goin' back the way ye came -- the Guardian's magic sealed the doors ye came through!" );
            locals[257] = 61;
            locals[258] = 62;
            locals[259] = 63;
            locals[260] = 0;
            locals[278] = babl_menu( 0, &locals[257] );
            switch ( locals[278] ) {

            case 1:

               goto label_0b36;

            break;

            case 2:

               goto label_0b3b;

            break;

            case 3:

            break;

            } // end switch

            say( "Gar! Begone, won't ya?" );
            func_0165();
            label_0b36:;

            say( "Did ya hit yer 'ead fallin' in? The trap doors to th' north! It's a new life for ya now -- nobody breaks the Guardian's seal!  Thou'rt never seein' daylight again, not in this world, mate!" );
            func_0165();
            label_0b3b:;

            say( "What do I know about it? It's Guardian-magic, and all I know is, no one who passes that door comes out again in this lifetime!" );
            func_0165();
         } // end if

         label_0b40:;

         locals[279] = 67;
         print( 1, &locals[279] );
         locals[280] = 68;
         locals[281] = 69;
         locals[282] = 70;
         locals[283] = 71;
         locals[284] = 0;
         locals[301] = babl_menu( 0, &locals[280] );
         switch ( locals[301] ) {

         case 1:

            goto label_0bb3;

         break;

         case 2:

            goto label_0bb8;

         break;

         case 3:

            goto label_0bbd;

         break;

         case 4:

            goto label_0bc2;

         break;

         } // end switch

         label_0bb3:;

         say( "Hail." );
         goto label_0bc5;

         label_0bb8:;

         say( "Well, I suppose I've seen worse." );
         goto label_0bc5;

         label_0bbd:;

         say( "Well, perhaps if you happen to ask any I feel like answering." );
         goto label_0bc5;

         label_0bc2:;

         say( "Gotta be tough down here just to have food to eat an' a place to sleep." );
      } // end if

   } // end if

   label_0bc5:;

   label_0bc5:;

   label_0bc5:;

   label_0bc5:;

   locals[302] = 76;
   locals[303] = 77;
   locals[304] = 78;
   locals[305] = 79;
   locals[306] = 0;
   locals[323] = babl_menu( 0, &locals[302] );
   switch ( locals[323] ) {

   case 1:

      goto label_0c2a;

   break;

   case 2:

      goto label_0c2f;

   break;

   case 3:

      goto label_0c68;

   break;

   case 4:

      goto label_0cd3;

   break;

   } // end switch

   label_0c2a:;

   say( "A hard day? You want to know if I've had a hard day? I've lost everything I ever owned, been thrown in this stinking prison for the rest of my life, I sleep in the dirt and eat slugs and leeches, and I have to fight for those, and you want to know if I've had a hard day? No, all the days down here are just jolly, mate!" );
   func_0165();
   label_0c2f:;

   locals[324] = 121;
   if ( get_quest( 1, &locals[324] ) ) {

      say( "Thou shouldst know -- art thou not the one that got the better of him?" );
   } else {

      say( "I knows you don't cross him, not if you want to live long down 'ere. He's the toughest fighter in the whole place, and he gets his cut of any loot anybody finds." );
   } // end if

   locals[1] = random( 1, &locals[325] );
   locals[325] = 2;
   if ( locals[1] == 1 ) {

   } else {

      func_0165();
      label_0c68:;

      say( "Don't know much, do ya? We settle everything by fighting in the four Arenas, just like they do up above. And when there's nothing to settle, we fight just to fill the time!" );
      locals[326] = 84;
      locals[327] = 85;
      locals[328] = 86;
      locals[329] = 87;
      locals[330] = 0;
      locals[347] = babl_menu( 0, &locals[326] );
      switch ( locals[347] ) {

      case 1:

         func_0165();
      break;

      case 2:

         goto label_1069;

      break;

      case 3:

         goto label_0fb7;

      break;

      case 4:

         say( "Yes, what is it?" );
         goto label_0bc5;

      break;

      } // end switch

      label_0cd3:;

      locals[348] = 7;
      func_0575( &locals[348] );
      say( "What, you mean the Pits? Oh, the Pits of Carnage ain't much of a place, but you'd best learn to call it home now, 'cause the Guardian's magic locked the doors ye came through! And if ya go wandering down them stairs, well...  Better to spill your blood on the Arena floor than let them creatures have it!" );
      locals[349] = 90;
      locals[350] = 91;
      locals[351] = 92;
      locals[352] = 0;
      locals[370] = babl_menu( 0, &locals[349] );
      switch ( locals[370] ) {

      case 1:

         goto label_0d35;

      break;

      case 2:

      break;

      case 3:

         goto label_0d3a;

      break;

      } // end switch

      say( "Gar! Sayest thou so? Then meet me in the arena! What is thy choice?" );
      func_03d4();
      label_0d35:;

      say( "Some say there's a mighty mage named Zoranthus down there, to the southwest, who eats human flesh, and has fireballs for eyes! Then again, there's them that says there are walking trees there too, so who can trust'em?" );
      goto label_0d3a;

      label_0d3a:;

      label_0d3a:;

      locals[1] = random( 1, &locals[371] );
      locals[371] = 2;
      if ( locals[1] == 1 ) {

      } else {

         func_0165();
      } // end if

   } // end if

   locals[372] = 95;
   print( 1, &locals[372] );
   locals[373] = 96;
   locals[374] = 97;
   locals[375] = 98;
   locals[376] = 99;
   locals[377] = 0;
   locals[394] = babl_menu( 0, &locals[373] );
   switch ( locals[394] ) {

   case 1:

      goto label_0dcd;

   break;

   case 2:

      goto label_0dd2;

   break;

   case 3:

      goto label_0dd7;

   break;

   case 4:

      goto label_0ddc;

   break;

   } // end switch

   label_0dcd:;

   say( "Hail to thee!" );
   goto label_0ddf;

   label_0dd2:;

   say( "Well met." );
   goto label_0ddf;

   label_0dd7:;

   say( "Thy prowess hast earned thee as much." );
   goto label_0ddf;

   label_0ddc:;

   say( "Thou hast done well in the arena thyself." );
   label_0ddf:;

   label_0ddf:;

   label_0ddf:;

   label_0ddf:;

   locals[395] = 104;
   locals[396] = 105;
   locals[397] = 106;
   locals[398] = 107;
   locals[399] = 0;
   locals[416] = babl_menu( 0, &locals[395] );
   switch ( locals[416] ) {

   case 1:

      goto label_0e44;

   break;

   case 2:

      goto label_0e49;

   break;

   case 3:

      goto label_0e67;

   break;

   case 4:

      goto label_0fb7;

   break;

   } // end switch

   label_0e44:;

   say( "Well, thou hast made a name for thyself in combat. Such prowess is the only true measure of a person's worth." );
   goto label_0e6a;

   label_0e49:;

   locals[417] = 121;
   if ( get_quest( 1, &locals[417] ) == 1 ) {

      say( "He was the mightiest warrior in the Pits. Was until ye came along, that is. " );
   } else {

      say( "He's a mighty warrior. Any that would challenge him had best be wary of his crossbow, he's an excellent shot. And don't ask him about his scar -- he doesn't take kindly to such talk. " );
   } // end if

   goto label_0e6a;

   label_0e67:;

   say( "Aye, someone found such a thing near the fountain not long ago. Of course Dorstag took it from him. He gets the best of everything. " );
   label_0e6a:;

   label_0e6a:;

   say( "Wouldst ask anything else, then? Or perhaps I could show thee some fighting tricks I've picked up. Myself, I'm good with the mace and axe." );
   locals[418] = 113;
   locals[419] = 114;
   locals[420] = 115;
   locals[421] = 0;
   locals[439] = babl_menu( 0, &locals[418] );
   switch ( locals[439] ) {

   case 1:

      goto label_0ddf;

   break;

   case 2:

      goto label_1073;

   break;

   case 3:

      func_0165();
   break;

   } // end switch

   label_0ebe:;

   locals[440] = 116;
   print( 1, &locals[440] );
   locals[441] = 117;
   locals[442] = 118;
   locals[443] = 119;
   locals[444] = 120;
   locals[445] = 0;
   locals[462] = babl_menu( 0, &locals[441] );
   switch ( locals[462] ) {

   case 1:

      goto label_0f31;

   break;

   case 2:

      goto label_0f36;

   break;

   case 3:

      goto label_0f3b;

   break;

   case 4:

      goto label_0f40;

   break;

   } // end switch

   label_0f31:;

   say( "Hail, mighty Avatar!" );
   goto label_0f43;

   label_0f36:;

   say( "Thanks for thy good wishes." );
   goto label_0f43;

   label_0f3b:;

   say( "Indeed, whatever thou might care to know." );
   goto label_0f43;

   label_0f40:;

   say( "Surely not as mighty as thee!" );
   label_0f43:;

   label_0f43:;

   label_0f43:;

   label_0f43:;

   label_0f43:;

   locals[463] = 125;
   locals[464] = 126;
   locals[465] = 127;
   locals[466] = 128;
   locals[467] = 0;
   locals[484] = babl_menu( 0, &locals[463] );
   switch ( locals[484] ) {

   case 1:

      goto label_0fa8;

   break;

   case 2:

      goto label_0fad;

   break;

   case 3:

      goto label_0fb2;

   break;

   case 4:

      func_0165();
   break;

   } // end switch

   label_0fa8:;

   say( "Thou art the biggest news we've had in a long time. Watching thee fight, well... It all but brings tears to one's eyes." );
   goto label_0f43;

   label_0fad:;

   say( "'Tis said fierce beasts dwell below. None of us has been down there since Dorstag led an expedition -- he was the only one to make it back. Some say there's a crazy man name Zoranthus who lives down there somewhere, in the middle of a maze. I don't believe 'em, though!" );
   goto label_0f43;

   label_0fb2:;

   say( "Nay, I fear thou art too great a warrior for the likes of me to face. I beg your pardon for declining." );
   func_0165();
   label_0fb7:;

   label_0fb7:;

   label_0fb7:;

   label_0fb7:;

   locals[1] = random( 1, &locals[485] );
   locals[485] = 10;
   locals[486] = locals[1];
   if ( 1 == locals[486] ) {

   } else {

      if ( 2 == locals[486] ) {

      } else {

         if ( 3 == locals[486] ) {

         } else {

            if ( 4 == locals[486] ) {

            } else {

               if ( 5 == locals[486] ) {

               } else {

                  if ( 6 == locals[486] ) {

                  } else {

                     if ( 7 == locals[486] ) {

                     } else {

                        if ( 8 == locals[486] ) {

                        } else {

                           if ( 9 == locals[486] ) {

                           } else {

                              if ( 10 == locals[486] ) {

                                 goto label_105d;

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

                  say( "I accept! And I'll choose the Arena of Earth to fight in." );
                  func_0441();
                  func_0110();
               } // end if

            } // end if

         } // end if

         say( "I'll accept that challenge, and face ye in the Arena of Water!" );
         func_0528();
         func_0110();
      } // end if

      say( "Very well. We'll see if you're nimble enough for the Arena of Air!" );
      func_048e();
      func_0110();
   } // end if

   label_105d:;

   say( "Then if you're bold enough, we'll face each other in the Arena of Fire!" );
   func_04db();
   func_0110();
   label_1064:;

   label_1064:;

   say( "Allright, then, where'll ya fight?" );
   func_03d4();
   label_1069:;

   locals[2] = 10;
   say( "Well, I suppose I could help ya, but it'll cost 10 gold. Or as much in supplies, or gems, or whatever ya got. I usually work with the axe and mace when I'm training." );
   goto label_107b;

   label_1073:;

   locals[2] = 3;
   say( "I'll just charge thee a few gold, or some small trinket. There's no free lunch down here, ye know." );
   label_107b:;

   locals[487] = 139;
   locals[488] = 140;
   locals[489] = 0;
   locals[508] = babl_menu( 0, &locals[487] );
   switch ( locals[508] ) {

   case 1:

      goto label_10b8;

   break;

   case 2:

      func_0165();
   break;

   } // end switch

   label_10b8:;

   label_10b8:;

   locals[19] = 0;
   locals[18] = 0;
   label_10c2:;

   label_10c2:;

   locals[17] = show_inv( 2, &locals[10], &locals[3] );
   if ( locals[17] > 0 ) {

      locals[1] = 1;
      while ( locals[1] <= locals[17] ) {

         if ( locals[2] == 160 ) {

            locals[18] = locals[18] + 3 * count_inv( 1, &locals[9] );
         } else {

            locals[18] = locals[18] + identify_inv( 4, &locals[510], &locals[21], &locals[509], &locals[9] );
            locals[509] = 0;
            locals[510] = 0;
         } // end if

         locals[1] = locals[1] + 1;
      } // while

      give_to_npc( 2, &locals[10], &locals[17] );
      if ( locals[18] >= 3 * locals[2] ) {

      } else {

         say( "I'll take that, but it's not enough." );
         locals[511] = 142;
         locals[512] = 143;
         locals[513] = 0;
         locals[532] = babl_menu( 0, &locals[511] );
         switch ( locals[532] ) {

         case 1:

            goto label_10c2;

         break;

         case 2:

            goto label_11df;

         } // end if

      } else {

      break;

      } // end switch

      say( "Take what? I don't see anything there." );
      locals[533] = 145;
      locals[534] = 146;
      locals[535] = 0;
      locals[554] = babl_menu( 0, &locals[533] );
      switch ( locals[554] ) {

      case 1:

         goto label_10c2;

      break;

      case 2:

         goto label_11df;

      break;

      } // end switch

      return;

      label_11df:;

      label_11df:;

      say( "Then I guess there'll be no training today." );
      func_0165();
   } // end if

   say( "Well, I'm good with axe and mace both. Which one do ya want to learn about?" );
   locals[555] = 149;
   locals[556] = 150;
   locals[557] = 151;
   locals[558] = 0;
   locals[576] = babl_menu( 0, &locals[555] );
   switch ( locals[576] ) {

   case 1:

      goto label_1238;

   break;

   case 2:

      goto label_126c;

   break;

   case 3:

      goto label_12e5;

   break;

   } // end switch

   label_1238:;

   locals[577] = 152;
   print( 1, &locals[577] );
   locals[578] = 4;
   locals[579] = 10001;
   if ( x_skills( 2, &locals[579], &locals[578] ) ) {

      say( "That should help out the next time you get in a scrap!" );
   } else {

      say( "No, ya haven't got it. You need to go out and do some more fighting before yer ready to learn this stuff." );
      goto label_12e0;

      label_126c:;

      locals[580] = 155;
      print( 1, &locals[580] );
      locals[581] = 5;
      locals[582] = 10001;
      if ( x_skills( 2, &locals[582], &locals[581] ) ) {

         say( "There, you've got the hang of it." );
      } else {

         say( "No, ya haven't got it. You need to go out and do some more fighting before yer ready to learn this stuff." );
      } // end if

   } // end if

   say( "Would you like to train some more?" );
   locals[583] = 159;
   locals[584] = 160;
   locals[585] = 0;
   locals[604] = babl_menu( 0, &locals[583] );
   switch ( locals[604] ) {

   case 1:

      goto label_10b8;

   break;

   case 2:

      goto label_12e0;

   break;

   } // end switch

   label_12e0:;

   label_12e0:;

   say( "Guess I'll see you around sometime." );
   func_0165();
   label_12e5:;

   say( "Suit th'self." );
   locals[605] = 163;
   print( 1, &locals[605] );
   func_0147();
} // end func

conversation #104
string block 0x0e67, name soldier

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[257];

   if ( private[0] == 0 ) {

      private[8] = 0;
   } // end if

   private[2] = babl_hack( 1, &locals[2] );
   locals[2] = 3;
   if ( private[2] ) {

   } else {

      if ( private[8] ) {

         locals[3] = 1;
         print( 1, &locals[3] );
         say( "All right, @GS8. How many will ye be killin' today?" );
      } else {

         if ( private[0] == 0 ) {

            say( "Ho there. Jospur's my name! Come to chance your life against a few coins? Many's them that do, sooner or later." );
            private[7] = 0;
            private[3] = 0;
         } else {

            if ( private[3] > 3 ) {

               if ( private[7] == 0 ) {

                  say( "You again! I refuse to do business with thee! 'Tis simply a waste of my money." );
               } else {

                  say( "I thought I told thee, I'll not lose any more money to thee!" );
               } // end if

               locals[4] = 6;
               locals[5] = 7;
               locals[6] = 0;
               locals[25] = babl_menu( 0, &locals[4] );
               switch ( locals[25] ) {

               case 1:

                  private[7] = 1;
                  func_0165();
               break;

               case 2:

               break;

               } // end switch

               say( "Okay, okay, let us do business, then! But 'tis naught but throwing my money away!" );
               private[8] = 1;
            } else {

               if ( private[3] > 1 ) {

                  say( "Oh, 'tis THEE again. I am honor-bound to take thy money, but, Guardian knows, thou shalt be my financial ruin! Come, what wouldst thou with me, today?" );
               } else {

                  say( "Hullo again, still alive I see! Perhaps you've come to make a wager today?" );
               } // end if

            } // end if

         } // end if

      } // end if

      label_0426:;

      label_0426:;

      label_0426:;

      label_0426:;

      label_0426:;

      label_0426:;

      private[6] = !private[3];
      locals[47] = private[6];
      locals[26] = 11;
      locals[48] = 1;
      locals[27] = 12;
      locals[49] = 1;
      locals[28] = 13;
      locals[50] = 1;
      locals[29] = 14;
      locals[30] = 0;
      locals[68] = babl_fmenu( 0, &locals[26], &locals[47] );
      switch ( locals[68] ) {

      case 11:

         goto label_0543;

      break;

      case 12:

         goto label_04bb;

      break;

      case 13:

         goto label_05dc;

      break;

      case 14:

         goto label_04b6;

      break;

      } // end switch

      label_04b6:;

      say( "Well, if you feel a bit bolder, or desperate for money, or just plain tired of living, you can always find me here!" );
      func_0165();
      label_04bb:;

      say( "Well, surely. But you don't think I'm the sort to gossip, surely! It's not just bad for business -- down here talking about folks the wrong way can earn you a dagger between your ribs while you sleep." );
      locals[69] = 17;
      locals[70] = 18;
      locals[71] = 19;
      locals[72] = 0;
      locals[90] = babl_menu( 0, &locals[69] );
      switch ( locals[90] ) {

      case 1:

         goto label_050f;

      break;

      case 2:

         goto label_0517;

      break;

      case 3:

         goto label_053e;

      break;

      } // end switch

      label_050f:;

      say( "Well, that's hardly a fit place for anyone with sense to venture. Not that it's so great up here, mind you, but still...\m" );
      say( "They never throw enough food down here, to make sure we have to fight for it. So sometimes a fool will go down looking to slay some dinner. Usually ends up being dinner instead. Better to take your chances with one of my wagers, I say." );
      goto label_0426;

      label_0517:;

      locals[91] = 25;
      if ( get_quest( 1, &locals[91] ) ) {

         say( "You should know as much about her as anyone. You're the one that finally beat her, after all." );
      } else {

         if ( play_sex ) {

         } else {

            say( "Oh, I get the idea. Well, don't get your hopes up. She'd rather kill than kiss. And with her magic, few have much chance against her in a fight. Better to take on 2 or 3 regular fellows in a fair fight, I'd say." );
         } // end if

         say( "Why don't you go ask her yourself? She doesn't think much of me, maybe you could get her to be more talkative than I could." );
         goto label_0426;

         label_053e:;

         say( "That's wise. Better to let a sword do your talking. Or a few gold coins, if you're lucky enough to have them!" );
         goto label_0426;

         label_0543:;

         say( "Well, here's how I work it. A bold warrior, such as yourself, gives me five gold coins. Then I arrange a fight in the arena against two opponents or more. Anyone tough enough to come back to me alive, I pay off their bet." );
         locals[92] = 27;
         locals[93] = 28;
         locals[94] = 0;
         locals[113] = babl_menu( 0, &locals[92] );
         switch ( locals[113] ) {

         case 1:

            goto label_0583;

         break;

         case 2:

            goto label_0588;

         break;

         } // end switch

         label_0583:;

         say( "Is that an insult or a compliment? Anyway, life is rough, and there ain't enough food to go around. So with me a fellow down on his luck at least has a chance." );
         goto label_0426;

         label_0588:;

         if ( private[3] ) {

            say( "I shouldn't offer you the same odds as everyone else. You'll be the ruin of me! Still, I guess I'd best not get on your bad side, tough as you are. Same bet, same payoff, you know the routine." );
         } else {

            say( "You beat two foes, I pay you 8 gold. Three foes is worth 12, four's worth 20, and if anyone ever beat five men, I'd pay 'em 40 or 50, I guess. Nobody's ever lasted long at those odds, though." );
         } // end if

         locals[114] = 32;
         locals[115] = 33;
         locals[116] = 0;
         locals[135] = babl_menu( 0, &locals[114] );
         switch ( locals[135] ) {

         case 1:

            goto label_05d2;

         break;

         case 2:

            goto label_05d7;

         break;

         } // end switch

         label_05d2:;

         say( "Anything else you'd like to know? I haven't got all day to stand around jabbering, after all." );
         goto label_0426;

         label_05d7:;

         say( "A fellows got to keep body and soul together somehow. And you know, a lot of those that come to me haven't got much choice..." );
         goto label_0426;

         label_05dc:;

         say( "Ah, good, you're a sporting type! How many do you feel bold enough to face, then?" );
      } // end if

      locals[136] = 37;
      locals[137] = 38;
      locals[138] = 39;
      locals[139] = 40;
      locals[140] = 0;
      locals[157] = babl_menu( 0, &locals[136] );
      switch ( locals[157] ) {

      case 1:

         goto label_0644;

      break;

      case 2:

         goto label_064e;

      break;

      case 3:

         goto label_0658;

      break;

      case 4:

         goto label_066c;

      break;

      } // end switch

      label_0644:;

      private[4] = 2;
      say( "Very prudent, keeping your risks small. " );
      goto label_06ab;

      label_064e:;

      private[4] = 3;
      say( "If it's three you want, then three you'll get." );
      goto label_06ab;

      label_0658:;

      private[4] = 4;
      if ( private[3] ) {

         say( "This is liable to be costly - for me!" );
      } else {

         say( "You are a bold one, aren't you?" );
      } // end if

      goto label_06ab;

      label_066c:;

      private[4] = 5;
      if ( private[3] > 2 ) {

         say( "'Tis no easy task to find five warriors foolish enought to fight thee, @GS8, but I shall try. Guardian knows, there's fools enough in the Pits o'Carnage!" );
      } else {

         if ( private[3] == 1 ) {

            say( "Total carnage! I love it!" );
         } else {

            locals[1] = sex( 2, &locals[159], &locals[158] );
            locals[158] = 47;
            locals[159] = 48;
            say( "Ah, I understand. Well, it is truly the most glorious death a @SS1 could ask for." );
         } // end if

      } // end if

      label_06ab:;

      label_06ab:;

      label_06ab:;

      say( "Now then, there is the small matter of the five gold pieces?" );
      locals[160] = 51;
      locals[161] = 52;
      locals[162] = 0;
      locals[181] = babl_menu( 0, &locals[160] );
      switch ( locals[181] ) {

      case 1:

         goto label_06f7;

      break;

      case 2:

      break;

      } // end switch

      if ( private[3] ) {

         say( "What a relief! I keep my money after all!" );
         func_0165();
      } else {

      } // end if

      label_06f7:;

      func_09da();
      say( "Since the odds are against you, it's your choice where to fight." );
      locals[182] = 55;
      locals[183] = 56;
      locals[184] = 57;
      locals[185] = 58;
      locals[186] = 0;
      locals[203] = babl_menu( 0, &locals[182] );
      switch ( locals[203] ) {

      case 1:

         func_08be();
      break;

      case 2:

         func_0905();
      break;

      case 3:

         func_094c();
      break;

      case 4:

         func_0993();
      } // end if

   break;

   } // end switch

   if ( private[2] == 40 ) {

   } else {

      if ( private[2] == 20 ) {

         private[3] = private[3] + 1;
      } // end if

      say( "Well fought, @GS8! That's @GI33 gold you've won, then." );
      label_077f:;

      label_077f:;

      if ( private[2] < 20 ) {

      } else {

         say( "For that much money, I could offer you some meat instead. Food's worth its weight in gold down here, you know." );
         locals[204] = 61;
         locals[205] = 62;
         locals[206] = 0;
         locals[225] = babl_menu( 0, &locals[204] );
         switch ( locals[225] ) {

         case 1:

            goto label_07c9;

         break;

         case 2:

            goto label_0836;

         } // end if

      break;

      } // end switch

      label_07c9:;

      private[5] = do_inv_create( 1, &locals[226] );
      locals[226] = 160;
      locals[227] = 1;
      locals[228] = 65535;
      locals[229] = 65535;
      locals[230] = 65535;
      locals[231] = 65535;
      locals[232] = 65535;
      locals[233] = 40;
      x_obj_stuff( 9, &locals[233], &locals[232], &locals[231], 33, &locals[230], &locals[229], &locals[228], &locals[227], 36 );
      say( "Here you are, then. See you around." );
      private[5] = take_id_from_npc( 1, 36 );
      func_0165();
      label_0836:;

      private[5] = do_inv_create( 1, &locals[234] );
      locals[234] = 176;
      say( "Here you go. Don't eat it all in one place! Harf harf..." );
      locals[235] = 176;
      take_from_npc( 1, &locals[235] );
      func_0165();
   } // end if

   if ( private[3] ) {

      say( "You've done it again! Amazing..." );
   } else {

      say( "You're still alive? After facing five? Why, this is unheard of!" );
   } // end if

   private[3] = private[3] + 1;
   say( "That'll be 40 gold, then, and you've certainly earned it." );
   locals[236] = 68;
   locals[237] = 69;
   locals[238] = 0;
   locals[257] = babl_menu( 0, &locals[236] );
   switch ( locals[257] ) {

   case 1:

      goto label_077f;

   break;

   case 2:

      goto label_08b1;

   break;

   } // end switch

   label_08b1:;

   say( "Oh, of course. I was just joking about the 40. Wouldn't want you to get upset, now..." );
   private[2] = 50;
   goto label_077f;

} // end func

void func_08be() {

   int locals[5];

   locals[1] = 3;
   locals[2] = 2;
   babl_hack( 4, &locals[2], 35, &locals[1], 34 );
   locals[3] = 38;
   locals[4] = 19;
   locals[5] = 57;
   teleport_player( 3, &locals[5], &locals[4], &locals[3] );
   func_0165();
} // end func

void func_0905() {

   int locals[5];

   locals[1] = 1;
   locals[2] = 2;
   babl_hack( 4, &locals[2], 35, &locals[1], 34 );
   locals[3] = 18;
   locals[4] = 38;
   locals[5] = 57;
   teleport_player( 3, &locals[5], &locals[4], &locals[3] );
   func_0165();
} // end func

void func_094c() {

   int locals[5];

   locals[1] = 2;
   locals[2] = 2;
   babl_hack( 4, &locals[2], 35, &locals[1], 34 );
   locals[3] = 21;
   locals[4] = 21;
   locals[5] = 57;
   teleport_player( 3, &locals[5], &locals[4], &locals[3] );
   func_0165();
} // end func

void func_0993() {

   int locals[5];

   locals[1] = 0;
   locals[2] = 2;
   babl_hack( 4, &locals[2], 35, &locals[1], 34 );
   locals[3] = 36;
   locals[4] = 36;
   locals[5] = 57;
   teleport_player( 3, &locals[5], &locals[4], &locals[3] );
   func_0165();
} // end func

void func_09da() {

   int locals[71];

   locals[19] = 5;
   label_09e4:;

   label_09e4:;

   locals[15] = show_inv( 2, &locals[8], &locals[1] );
   locals[16] = 0;
   if ( locals[15] > 0 ) {

      locals[17] = 1;
      locals[18] = 0;
      while ( locals[17] <= locals[15] ) {

         if ( locals[0] == 160 ) {

            locals[16] = locals[16] + count_inv( 1, &locals[7] );
            locals[18] = locals[18] + 1;
            locals[20] = locals[7];
         } // end if

         locals[17] = locals[17] + 1;
      } // while

      if ( locals[16] >= locals[19] ) {

         give_to_npc( 2, &locals[21], &locals[18] );
      } else {

         if ( locals[18] == 0 ) {

            say( "I only take gold coins, I'm afraid." );
         } else {

            say( "The fee is five, take it or leave it." );
         } // end if

         locals[28] = 73;
         locals[29] = 74;
         locals[30] = 0;
         locals[49] = babl_menu( 0, &locals[28] );
         switch ( locals[49] ) {

         case 1:

            goto label_09e4;

         break;

         case 2:

            goto label_0afc;

         } // end if

      } else {

      break;

      } // end switch

      say( "Come on, let's see those coins!" );
      locals[50] = 76;
      locals[51] = 77;
      locals[52] = 0;
      locals[71] = babl_menu( 0, &locals[50] );
      switch ( locals[71] ) {

      case 1:

         goto label_09e4;

      break;

      case 2:

         goto label_0afc;

      break;

      } // end switch

      label_0afc:;

      label_0afc:;

      say( "Well, I don't run a charity, you know. Come back when you have some real money!" );
      func_0165();
   } // end if

} // end func

conversation #105
string block 0x0e68, name Merzan

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04ff();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[1];

   locals[1] = 54;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "The Keep's going down! Make thy peace with the Guardian, for now we die!" );
      npc_goal = 6;
      func_0156();
   } // end if

} // end func

void func_04ff() {

   int locals[93];

   locals[1] = 50;
   if ( get_quest( 1, &locals[1] ) ) {

      func_04d9();
   } // end if

   private[3] = func_0bbb();
   locals[2] = 54;
   if ( get_quest( 1, &locals[2] ) ) {

      if ( private[0] == 0 ) {

         say( "I don't know what you're doin', pokin' around these ruins, but you'd best clear out pretty fast!" );
         locals[3] = 19;
         locals[4] = 20;
         locals[5] = 0;
         locals[24] = babl_menu( 0, &locals[3] );
         switch ( locals[24] ) {

         case 1:

         break;

         case 2:

            goto label_05dc;

         break;

         } // end switch

         if ( private[3] ) {

            locals[25] = 21;
            print( 1, &locals[25] );
            say( "Oh. Excuse me!" );
            locals[26] = 23;
            locals[27] = 24;
            locals[28] = 0;
            locals[47] = babl_menu( 0, &locals[26] );
            switch ( locals[47] ) {

            case 1:

               func_0147();
            break;

            case 2:

               func_0a67();
            } // end if

         } else {

         break;

         } // end switch

         locals[48] = 25;
         print( 1, &locals[48] );
         say( "You are, are you? Well, I don't talk to nobody who ain't wearin' the ring! Move along!" );
         func_0156();
         label_05dc:;

         if ( private[3] ) {

            say( "A traveler, huh? Well, you're wearin' the ring, so I guess you're okay!" );
            func_0a67();
         } else {

            locals[49] = 28;
            print( 1, &locals[49] );
            say( "I suggest you keep travelling, and don't ask questions. Anybody not wearing the ring is a suspicious character, far as I'm concerned!" );
            func_0156();
         } // end if

      } else {

         say( "You again? What is it?" );
         if ( private[3] ) {

            locals[50] = 31;
            locals[51] = 32;
            locals[52] = 0;
            locals[71] = babl_menu( 0, &locals[50] );
            switch ( locals[71] ) {

            case 1:

               func_0a67();
            break;

            case 2:

            break;

            } // end switch

            say( "If you say so." );
            func_0147();
         } else {

            locals[72] = 34;
            locals[73] = 35;
            locals[74] = 0;
            locals[93] = babl_menu( 0, &locals[72] );
            switch ( locals[93] ) {

            case 1:

            break;

            case 2:

               func_0156();
            break;

            } // end switch

            say( "Tell it to Mors Gotha, stranger! Now move along before I run you through!" );
            func_0156();
         } // end if

      } // end if

   } // end if

   if ( private[0] == 0 ) {

      private[2] = 0;
      say( "Yeah, what is it?" );
      func_06a6();
   } // end if

   if ( private[0] ) {

      say( "Oh, it's you again." );
      func_06a6();
   } // end if

} // end func

void func_06a6() {

   int locals[22];

   locals[1] = 39;
   locals[2] = 40;
   locals[3] = 41;
   locals[4] = 42;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0713();
   break;

   case 2:

      func_0800();
   break;

   case 3:

      func_0a4d();
   break;

   case 4:

      func_0147();
   break;

   } // end switch

} // end func

void func_0713() {

   int locals[22];

   say( "You bet yer ass it is!  Fightin' men don't come any tougher 'n meaner 'n us. When we land this thing, it's gonna be a slaughter!" );
   locals[1] = 44;
   locals[2] = 45;
   locals[3] = 46;
   locals[4] = 47;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0855();
   break;

   case 2:

      func_0147();
   break;

   case 3:

      func_080d();
   break;

   case 4:

      func_0783();
   break;

   } // end switch

} // end func

void func_0783() {

   int locals[22];

   say( "Mors Gotha don't pick her soldiers for their looks, pal. We're leadin' this invasion 'cause we've never lost a battle. This one comin' up ain't gonna change that, neither!" );
   locals[1] = 49;
   locals[2] = 50;
   locals[3] = 51;
   locals[4] = 52;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_07f3();
   break;

   case 2:

      func_0a5a();
   break;

   case 3:

      func_0855();
   break;

   case 4:

      func_0147();
   break;

   } // end switch

} // end func

void func_07f3() {

   say( "I shoulda known you were a jester! Who is Mors Gotha? You'd better crawl back to the rock you've been under and stay outta the way!" );
   func_0147();
} // end func

void func_0800() {

   say( "Yeah? Well, who asked you, anyway?" );
   func_0156();
} // end func

void func_080d() {

   int locals[22];

   say( "Some o' th' new guys are complainin' about the rations, but most of us have seen leaner times than this! Two sticks o' meat per day is a feast compared to what I've seen on other campaigns." );
   locals[1] = 56;
   locals[2] = 57;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0855();
   break;

   case 2:

      func_0147();
   break;

   } // end switch

} // end func

void func_0855() {

   int locals[46];

   locals[1] = 15;
   locals[2] = 9999;
   if ( x_skills( 2, &locals[2], &locals[1] ) > 10 ) {

      say( "Well, I reckon it's not harm if I tell you a little o' what we got going, between friends 'n' all." );
   } else {

      if ( private[3] ) {

         say( "We soldiers don't get told much, but sure, I guess I could." );
      } // end if

      locals[3] = 60;
      locals[4] = 61;
      locals[5] = 0;
      locals[24] = babl_menu( 0, &locals[3] );
      switch ( locals[24] ) {

      case 1:

         func_08f2();
      break;

      case 2:

         func_0147();
      } // end if

   } else {

   break;

   } // end switch

   say( "Hey, you know we're not s'posed to talk about that!" );
   locals[25] = 63;
   locals[26] = 0;
   locals[46] = babl_menu( 0, &locals[25] );
   if ( locals[46] == 1 ) {

      func_0147();
   } // end if

} // end func

void func_08f2() {

   int locals[3];

   locals[1] = random( 1, &locals[2] );
   locals[2] = 9;
   if ( private[2] > 2 ) {

      locals[1] = locals[1] + 2;
   } // end if

   locals[3] = locals[1];
   if ( 1 == locals[3] ) {

      say( "Craziest mission I've seen yet -- we're all fitted out for a siege operation, but here we are inside a castle already, floating a league in the air, over a goddamn desert, with no other castle within 500 miles of here. Sorcery here somewhere, bet your ass." );
   } else {

      if ( 2 == locals[3] ) {

         say( "I hear the Guardian got in somehow and took out all the enemy mages. Nothing like fighting with a Titan on your side, I'll tell ya!" );
      } else {

         if ( 3 == locals[3] ) {

            say( "The defenders are 100% sealed up in there, some kinda blackrock casting. Some guys are sayin' we'll just be goin' in and cleanin' up." );
         } else {

            if ( 4 == locals[3] ) {

               say( "I heard they've found a way in through the basement. We'll be going in as soon as the rest of the troops get here." );
            } else {

               if ( 5 == locals[3] ) {

                  say( "Nothing like workin' under Gotha. Like voodoo, her touch. 'Less yer in the forward units, o'course -- she does like to have a few rookies in front to spring the traps." );
               } else {

                  if ( 6 == locals[3] ) {

                     say( "I hear they hadda herd in a few extra -- whaddayacallem -- brain creatures to hold up the extra weight in the castle." );
                  } else {

                     if ( 7 == locals[3] ) {

                        say( "Mors Gotha's promised us that this invasion's gonna be cake, which means lots of plunder to be had, I'm thinkin'. Hope we'll be allowed to pick our own!" );
                     } else {

                        if ( 8 == locals[3] ) {

                           say( "I heard that they bottled up the enemy inside their fortress, but that they got some sort of hero-type in there with 'em. Still, with Gotha and the Guardian on our side, I ain't worried." );
                        } else {

                           if ( 9 == locals[3] ) {

                              say( "Even with the crack troops we got in here alraedy, we're waitin' on the whole rest of the army! This is gonna be one hell of a siege, I'll tell ya. Can't wait to land this thing and get on with it!" );
                           } else {

                              if ( 10 == locals[3] ) {

                                 say( "I think you should be on yer way, pal." );
                                 func_0147();
                              } else {

                                 if ( 11 == locals[3] ) {

                                    say( "I think you should be on yer way, pal." );
                                    func_0147();
                                 } // end if

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   private[2] = private[2] + 1;
   func_09c2();
} // end func

void func_09c2() {

   int locals[26];

   locals[1] = random( 1, &locals[3] );
   locals[3] = 3;
   locals[4] = locals[1];
   if ( 1 == locals[4] ) {

      locals[2] = 75;
   } else {

      if ( 2 == locals[4] ) {

         locals[2] = 76;
      } else {

         if ( 3 == locals[4] ) {

            locals[2] = 77;
         } // end if

      } // end if

   } // end if

   locals[5] = 78;
   locals[6] = 79;
   locals[7] = 0;
   locals[26] = babl_menu( 0, &locals[5] );
   switch ( locals[26] ) {

   case 1:

      func_08f2();
   break;

   case 2:

      func_0147();
   break;

   } // end switch

} // end func

void func_0a4d() {

   say( "Well, I'll take a look at what ye got, anyways." );
   func_035a();
} // end func

void func_0a5a() {

   say( "Would I? Ain't nobody can beat me in a barter!" );
   func_035a();
} // end func

void func_0a67() {

   int locals[29];

   say( "Well, they ain't tellin' us grunts too much, but here's what the grapevine's sayin'." );
   label_0a6f:;

   locals[1] = random( 1, &locals[4] );
   locals[4] = 9;
   if ( private[2] > 1 ) {

      locals[1] = locals[1] + 2;
   } // end if

   locals[5] = locals[1];
   if ( 1 == locals[5] ) {

      say( "Craziest mission I've seen yet -- we're all fitted out for a siege operation, but here we are inside a wreck of a castle in the middle of a goddamn desert, with no other castle within 500 miles of here. Sorcery here somewhere, bet your ass." );
   } else {

      if ( 2 == locals[5] ) {

         say( "I hear the Guardian got in somehow and took out all the enemy mages. Nothing like fighting with a Titan on your side, I'll tell ya!" );
      } else {

         if ( 3 == locals[5] ) {

            say( "The defenders are 100% sealed up in there, some kinda blackrock casting. Some guys are sayin' we'll just be goin' in and cleanin' up." );
         } else {

            if ( 4 == locals[5] ) {

               say( "I heard they've found a way in through the basement. We'll be going in as soon as the rest of the troops get here." );
            } else {

               if ( 5 == locals[5] ) {

                  say( "Nothing like workin' under Gotha. Like voodoo, her touch. 'Less yer in the forward units, o'course -- she does like to have a few rookies in front to spring the traps." );
               } else {

                  if ( 6 == locals[5] ) {

                     say( "Somethin' horrible happened here -- corpses everywhere, anyone can see that. Nobody's sayin' what, though." );
                  } else {

                     if ( 7 == locals[5] ) {

                        say( "Mors Gotha's promised us that this invasion's gonna be cake, which means lots of plunder to be had, I'm thinkin'. Hope we'll be allowed to pick our own!" );
                     } else {

                        if ( 8 == locals[5] ) {

                           say( "I heard that they bottled up the enemy inside their fortress, but that they got some sort of hero-type in there with 'em. Still, with Gotha and the Guardian on our side, I ain't worried." );
                        } else {

                           if ( 9 == locals[5] ) {

                              say( "Even with the crack troops we got in here already, we're waitin' on the whole rest of the army! This is gonna be one hell of a siege, I'll tell ya. Wish to hell I knew what we're doin' in the middle of this desert!" );
                           } else {

                              if ( 10 == locals[5] ) {

                                 say( "I think you should be on yer way, pal." );
                                 func_0147();
                              } else {

                                 if ( 11 == locals[5] ) {

                                    say( "I think you should be on yer way, pal." );
                                    func_0147();
                                 } // end if

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   private[2] = private[2] + 1;
   locals[2] = random( 1, &locals[6] );
   locals[6] = 3;
   locals[7] = locals[2];
   if ( 1 == locals[7] ) {

      locals[3] = 94;
   } else {

      if ( 2 == locals[7] ) {

         locals[3] = 95;
      } else {

         if ( 3 == locals[7] ) {

            locals[3] = 96;
         } // end if

      } // end if

   } // end if

   locals[8] = 97;
   locals[9] = 98;
   locals[10] = 0;
   locals[29] = babl_menu( 0, &locals[8] );
   switch ( locals[29] ) {

   case 1:

      goto label_0a6f;

   break;

   case 2:

      func_0147();
   break;

   } // end switch

} // end func

void func_0bbb() {

   int locals[2];

   locals[2] = 10;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0bd5;

   label_0bd5:;

   return locals[1];
} // end func

could not find string block 0x0e6a.
could not find string block 0x0e6b.
could not find string block 0x0e6c.
could not find string block 0x0e6d.
could not find string block 0x0e6e.
could not find string block 0x0e6f.
could not find string block 0x0e70.
could not find string block 0x0e71.
could not find string block 0x0e72.
could not find string block 0x0e73.
could not find string block 0x0e74.
could not find string block 0x0e75.
could not find string block 0x0e76.
could not find string block 0x0e77.
could not find string block 0x0e78.
could not find string block 0x0e79.
could not find string block 0x0e7a.
could not find string block 0x0e7b.
could not find string block 0x0e7c.
could not find string block 0x0e7d.
could not find string block 0x0e7e.
could not find string block 0x0e7f.
could not load code ...
conversation #129
string block 0x0e80, name guard

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04d9();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[122];

   if ( private[0] == 0 ) {

      private[3] = 0;
      private[2] = sex( 2, &locals[2], &locals[1] );
      locals[1] = 17;
      locals[2] = 18;
      private[4] = 0;
      private[5] = 0;
   } // end if

   if ( npc_hp < 5 ) {

      npc_hp = 25;
      if ( private[0] == 0 ) {

         say( "Cor! Leave it, won't you? Serves me roight for tryin' to rob the castle, 'n' gettin' caught. Last time I take a dare from Erik Blackhand!" );
         locals[3] = 20;
         locals[4] = 21;
         locals[5] = 0;
         locals[24] = babl_menu( 0, &locals[3] );
         switch ( locals[24] ) {

         case 1:

         break;

         case 2:

            goto label_0566;

         break;

         } // end switch

         say( "Name's Fissif, thief extra-ordinaire, 'cept when a bleedin' gem appears over my escape route!" );
         label_0566:;

         say( "I suppose you'll be wantin' yer pocketwatch back, then, Avatar! Well, here ye go." );
         locals[25] = 175;
         take_from_npc( 1, &locals[25] );
         say( "And off to jail fer poor old Fissif, I s'pose." );
         func_0e6b();
      } else {

         say( "Okay, okay, y'dinna have ta get so rough, I'll go off to jail wi'ye. 'S not like I 'aven't been before!" );
         npc_hp = 25;
         locals[26] = 26;
         print( 1, &locals[26] );
         private[3] = 1;
         locals[27] = 65535;
         locals[28] = 65535;
         locals[29] = 65535;
         locals[30] = 1;
         transform_talker( 4, &locals[30], &locals[29], &locals[28], &locals[27] );
         func_0e6b();
      } // end if

   } // end if

   if ( private[5] ) {

      say( "Cor! Wot does 'is Majesty want now?" );
      locals[31] = 28;
      locals[32] = 29;
      locals[33] = 0;
      locals[52] = babl_menu( 0, &locals[31] );
      switch ( locals[52] ) {

      case 1:

         func_0a19();
      break;

      case 2:

      break;

      } // end switch

      say( "And where would I be goin' then?" );
      func_0147();
   } // end if

   locals[53] = 112;
   if ( get_quest( 1, &locals[53] ) == 1 ) {

      locals[54] = 31;
      print( 1, &locals[54] );
      say( "HA HA HA HA HA HA!" );
      locals[55] = 33;
      print( 1, &locals[55] );
      say( "And what virtue wert thou upholding that thou didst arrive here, "Avatar?"" );
      locals[56] = 35;
      locals[57] = 36;
      locals[58] = 0;
      locals[77] = babl_menu( 0, &locals[56] );
      switch ( locals[77] ) {

      case 1:

      break;

      case 2:

         goto label_0752;

      break;

      } // end switch

      say( "I beg thy pardon, your Avatahness!!" );
      func_0165();
   } // end if

   if ( private[0] == 0 ) {

      say( "Psst! @GS33! Canst thou tell me wot's goin' on, then?" );
      locals[78] = 39;
      locals[79] = 40;
      locals[80] = 41;
      locals[81] = 0;
      locals[99] = babl_menu( 0, &locals[78] );
      switch ( locals[99] ) {

      case 1:

         func_07f7();
      break;

      case 2:

         func_0764();
      break;

      case 3:

         func_0ec6();
      } // end if

   break;

   } // end switch

   if ( private[3] ) {

      if ( npc_hp < 5 ) {

         say( "Well, it's a fair cop!" );
         func_0110();
      } else {

         locals[100] = 43;
         print( 1, &locals[100] );
         say( "Well, well! If it isn't the Avatar, come to visit! 'Ow nice o'ye!" );
         locals[101] = 45;
         locals[102] = 46;
         locals[103] = 47;
         locals[104] = 0;
         locals[122] = babl_menu( 0, &locals[101] );
         switch ( locals[122] ) {

         case 1:

         break;

         case 2:

            func_0f9a();
         break;

         case 3:

            func_0ade();
         break;

         } // end switch

         label_0752:;

         if ( private[4] ) {

            say( "Cor! If it ain't one thing, it's another!" );
         } else {

            say( "Cor! Fissif's comin' up in the world! The Avatah would like 'is help!" );
         } // end if

         func_0aeb();
      } // end if

   } // end if

} // end func

void func_0764() {

   int locals[22];

   say( "The bleedin' red blighter again, eh? Should've known 'e'd be 'round again, after I saw those Fellowship types moving in around Buccaneer's Den! They said 'twas just a reunion, but I suspected they was up to somethin'." );
   locals[1] = 51;
   locals[2] = 52;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_07f7();
   break;

   case 2:

      func_07ac();
   break;

   } // end switch

} // end func

void func_07ac() {

   int locals[22];

   say( "Not me, no @GS33! Can't stand all that preaching! Besides, any bloke wot's got eyes c'n see they're on the losing team, roight?" );
   locals[1] = 54;
   locals[2] = 55;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_0f11();
   break;

   } // end switch

   say( "Just my own, I suppose." );
   func_07f7();
} // end func

void func_07f7() {

   int locals[23];

   if ( game_days > 1 ) {

      locals[1] = game_days;
   } else {

      locals[1] = 2;
   } // end if

   say( "I hates ta tell a stranger the plain truth, but me situation's a bit desperate. My name's Fissif, an' I came up here about @SI1 days ago through the tunnel from Buccaneer's Den, to see what could be... acquired under cover of the festivities." );
   locals[2] = 58;
   locals[3] = 59;
   locals[4] = 60;
   locals[5] = 61;
   locals[6] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_08d1();
   break;

   case 2:

      func_087c();
   break;

   case 3:

      func_0889();
   break;

   case 4:

      func_0f11();
   break;

   } // end switch

} // end func

void func_087c() {

   say( "I found the Avatar's pocketwatch in a bunch o'junk in a closet. I 'ad me the key t'the armory, too, but I lost it in a scuffle with th'green giant! By the way, what did thou sayest thy name was?" );
   func_08de();
} // end func

void func_0889() {

   int locals[22];

   say( "'Twas about 4:15 in the morning, and I was just making me way down through the basement to the tunnel, when the bloody ground started shaking, knocked me off my feet! When I got up and went downstairs, this black stuff was blocking the cave mouth!" );
   locals[1] = 64;
   locals[2] = 65;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a19();
   break;

   case 2:

      func_087c();
   break;

   } // end switch

} // end func

void func_08d1() {

   say( "Oy got a right to this pocketwatch oy stole, seein' that some bloomin' idiot left it out f'me tatake! Would've 'ad me th'key to th'armoury, too, if Oy'adn't lost it inna fight wi'that reaper! An'oo art thou to be putting on airs? Anyone'd think yer the bleedin' Avatah 'r sumthin'!" );
   func_08de();
} // end func

void func_08de() {

   int locals[45];

   locals[1] = 67;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

   } // end if

   say( "Oh." );
   say( "Then I s'pose thou wilt be wanting thy pocketwatch back again." );
   locals[23] = 70;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

   } // end if

   locals[45] = 175;
   take_from_npc( 1, &locals[45] );
   func_094a();
} // end func

void func_094a() {

   int locals[1];

   say( "Perhaps I should be getting along, then." );
   locals[1] = 72;
   print( 1, &locals[1] );
   func_0965();
} // end func

void func_0965() {

   int locals[22];

   locals[1] = 73;
   locals[2] = 74;
   locals[3] = 75;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_09be();
   break;

   case 2:

      func_10ea();
   break;

   case 3:

      func_0a19();
   break;

   } // end switch

} // end func

void func_09be() {

   int locals[23];

   say( "Oh, things to do. Oy've got rats to kill and eat, fetid water to sip, that sort o' thing. Oy'm a busy man!" );
   locals[1] = 77;
   locals[2] = 78;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a19();
   break;

   case 2:

   break;

   } // end switch

   locals[23] = 79;
   print( 1, &locals[23] );
   private[5] = 1;
   func_0156();
} // end func

void func_0a19() {

   int locals[22];

   private[5] = 0;
   say( "Arrest? And why should I come with thee to jail? We are all in the Guardian's jail, anyway!" );
   locals[1] = 81;
   locals[2] = 82;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a88();
   break;

   case 2:

      func_0a66();
   break;

   } // end switch

} // end func

void func_0a66() {

   int locals[1];

   say( "Thou hast a point. 'S not as if I 'aven't done time before." );
   private[3] = 1;
   locals[1] = 84;
   print( 1, &locals[1] );
   func_0e6b();
   func_0147();
} // end func

void func_0a88() {

   int locals[23];

   locals[1] = 85;
   print( 1, &locals[1] );
   say( "Thou dost look a bit out of shape, @GS8. I believe I shall take my chances with thee." );
   locals[2] = 87;
   locals[3] = 88;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0110();
   break;

   case 2:

      func_0a66();
   break;

   } // end switch

} // end func

void func_0ade() {

   say( "Well, odds are I'll still be here, if thou dost wish to return." );
   func_0147();
} // end func

void func_0aeb() {

   int locals[44];

   private[4] = 1;
   say( "Well, 'twill cost thee something, I'll tell thee that. 3 in gold. What say thee?" );
   locals[1] = 91;
   locals[2] = 92;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0d19();
   break;

   case 2:

      func_0ade();
   break;

   } // end switch

   locals[23] = 93;
   locals[24] = 94;
   locals[25] = 95;
   locals[26] = 96;
   locals[27] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_0b9d();
   break;

   case 2:

      func_0bea();
   break;

   case 3:

      func_0c37();
   break;

   case 4:

      func_0c84();
   break;

   } // end switch

} // end func

void func_0b9d() {

   int locals[4];

   say( "Oho! The Avatah wants to pick locks, does he? Thou dost wish to stoop to usin' trickery, dost thou? 'Tis not very virtuous of thee, but I suppose I might show thee a thing or two." );
   locals[1] = 16;
   locals[2] = 10001;
   if ( x_skills( 2, &locals[2], &locals[1] ) ) {

      locals[3] = 98;
      print( 1, &locals[3] );
      func_0cd1();
   } else {

      locals[4] = 99;
      print( 1, &locals[4] );
      say( "'Tis no use! Thou shouldst go out and pick a few locks in the real world, then I shall explain more to thee!." );
      say( "Well, that's it for thee today, chum!" );
      func_0165();
   } // end if

} // end func

void func_0bea() {

   int locals[4];

   say( "I see! The Avatah wishes to learn a bit of thievery, does it? Well, let's just see..." );
   locals[1] = 13;
   locals[2] = 10001;
   if ( x_skills( 2, &locals[2], &locals[1] ) ) {

      locals[3] = 103;
      print( 1, &locals[3] );
      func_0cd1();
   } else {

      locals[4] = 104;
      print( 1, &locals[4] );
      say( "Nay, nay! Go out and try a few things, first, then come see more." );
      say( "Well, that's it for thee today, chum!" );
      func_0165();
   } // end if

} // end func

void func_0c37() {

   int locals[4];

   say( "Stealing somebody's precious goodies, are we? Well, just let Fissif tell thee how to go about it..." );
   locals[1] = 10;
   locals[2] = 10001;
   if ( x_skills( 2, &locals[2], &locals[1] ) ) {

      locals[3] = 108;
      print( 1, &locals[3] );
      func_0cd1();
   } else {

      locals[4] = 109;
      print( 1, &locals[4] );
      say( "Thou hadst better go and look at a few real traps, first." );
      say( "Well, that's it for thee today, chum!" );
      func_0165();
   } // end if

} // end func

void func_0c84() {

   int locals[4];

   say( "Taking a few knocks, are we?  Let me give you a few tips, then." );
   locals[1] = 17;
   locals[2] = 10001;
   if ( x_skills( 2, &locals[2], &locals[1] ) ) {

      locals[3] = 113;
      print( 1, &locals[3] );
      func_0cd1();
   } else {

      locals[4] = 114;
      print( 1, &locals[4] );
      say( "'Tis of no use, thou'rt a hopeless klutz! If thou wouldst like, we shall give it another try later." );
      say( "Well, that's it for thee today, chum!" );
      func_0165();
   } // end if

} // end func

void func_0cd1() {

   int locals[22];

   say( "Wouldst thou learn anything else, while thou art here?" );
   locals[1] = 118;
   locals[2] = 119;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0ade();
   break;

   case 2:

      func_0aeb();
   break;

   } // end switch

} // end func

void func_0d19() {

   int locals[71];

   locals[18] = 0;
   locals[16] = 0;
   locals[20] = 3;
   label_0d2d:;

   label_0d2d:;

   locals[15] = show_inv( 2, &locals[8], &locals[1] );
   if ( locals[15] > 0 ) {

      locals[17] = 1;
      locals[19] = 0;
      while ( locals[17] <= locals[15] ) {

         if ( locals[0] == 160 ) {

            locals[16] = locals[16] + count_inv( 1, &locals[7] );
            locals[19] = locals[19] + 1;
            locals[20] = locals[7];
         } // end if

         locals[17] = locals[17] + 1;
      } // while

      if ( locals[16] >= locals[20] ) {

         give_to_npc( 2, &locals[21], &locals[19] );
         say( "Ah, that's the stuff! Now, to business." );
      } else {

         if ( locals[19] == 0 ) {

            say( "Cor! Just gold, please. Oy'm sick o'hagglin' with fences!" );
         } else {

            say( "Oy said "ten," di'n'Oy?" );
         } // end if

         locals[28] = 123;
         locals[29] = 124;
         locals[30] = 0;
         locals[49] = babl_menu( 0, &locals[28] );
         switch ( locals[49] ) {

         case 1:

            goto label_0d2d;

         break;

         case 2:

            func_0e5e();
         } // end if

      } else {

      break;

      } // end switch

      if ( locals[18] > 2 ) {

         say( "Enough o'this, Avatah. Oy'm willin' ta train thee, but no more o'these silly games." );
         func_0156();
      } else {

         say( "That's it, then, let's 'ave it on the table." );
         locals[50] = 127;
         locals[51] = 128;
         locals[52] = 0;
         locals[71] = babl_menu( 0, &locals[50] );
         switch ( locals[71] ) {

         case 1:

            locals[18] = locals[18] + 1;
            goto label_0d2d;

         break;

         case 2:

            func_0e5e();
         } // end if

      } // end if

   break;

   } // end switch

} // end func

void func_0e5e() {

   say( "Suit th'self, then, Avatah!" );
   func_0147();
} // end func

void func_0e6b() {

   int locals[6];

   private[3] = 1;
   locals[1] = 119;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 15;
   locals[4] = 15;
   locals[5] = 10001;
   locals[6] = x_clock( 2, &locals[5], &locals[4] ) + 1;
   x_clock( 2, &locals[6], &locals[3] );
   remove_talker( 0 );
   func_0165();
} // end func

void func_0ec6() {

   int locals[22];

   say( "Nah, nah, wot'm'I, crazy? I came'ere through th'tunnel from the Den!" );
   locals[1] = 131;
   locals[2] = 132;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      func_07f7();
   break;

   } // end switch

   say( "Bucc'neer's Den, o'course!" );
   func_07f7();
} // end func

void func_0f11() {

   int locals[44];

   say( "'Ere f'r a bit o' sightseein', are ye? Well, Fissif'l 'elp yew out a bit! Stay away from the 'eadlesses next door, that'l do fer a start. If ye're lookin' for a short cut downstairs, ye can jump a few platforms, 'n'op down the rabbit'ole." );
   locals[1] = 135;
   locals[2] = 136;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0f92;

   break;

   } // end switch

   say( "Thou shalt see! Just watch for the big duck pond, 'n keep to your left!" );
   locals[23] = 138;
   locals[24] = 139;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

   break;

   case 2:

      func_08d1();
   break;

   } // end switch

   label_0f92:;

   say( "I know m'way 'round'ere, I does! 'N soon's I get back out, I'll make me a nice piece o'change from this pocketwatch! Stole it right from the Avatar's quarters, I did, 'n'none the wiser! By th'way, what didst thou say thy name was?" );
   func_08de();
} // end func

void func_0f9a() {

   int locals[30];

   say( "I s'pose I could -- got a fine selection o'lockpicks'n'such right'ere!" );
   locals[2] = 257;
   locals[3] = 0;
   if ( find_inv( 2, &locals[3], &locals[2] ) == 0 ) {

      locals[1] = do_inv_create( 1, &locals[4] );
      locals[4] = 257;
      locals[5] = 1;
      locals[6] = 65535;
      locals[7] = 65535;
      locals[8] = 65535;
      locals[9] = 65535;
      locals[10] = 65535;
      locals[11] = 65535;
      locals[12] = 40;
      x_obj_stuff( 9, &locals[12], &locals[11], &locals[10], &locals[9], &locals[8], &locals[7], &locals[6], &locals[5], &locals[1] );
      locals[1] = do_inv_create( 1, &locals[13] );
      locals[13] = 257;
      locals[14] = 1;
      locals[15] = 65535;
      locals[16] = 65535;
      locals[17] = 65535;
      locals[18] = 65535;
      locals[19] = 65535;
      locals[20] = 65535;
      locals[21] = 40;
      x_obj_stuff( 9, &locals[21], &locals[20], &locals[19], &locals[18], &locals[17], &locals[16], &locals[15], &locals[14], &locals[1] );
      locals[1] = do_inv_create( 1, &locals[22] );
      locals[22] = 257;
      locals[23] = 1;
      locals[24] = 65535;
      locals[25] = 65535;
      locals[26] = 65535;
      locals[27] = 65535;
      locals[28] = 65535;
      locals[29] = 65535;
      locals[30] = 40;
      x_obj_stuff( 9, &locals[30], &locals[29], &locals[28], &locals[27], &locals[26], &locals[25], &locals[24], &locals[23], &locals[1] );
   } // end if

   func_035a();
} // end func

void func_10ea() {

   int locals[46];

   say( "'Ere f'r a bit o' sightseein', are ye? Well, Fissif'l 'elp yew out a bit! Stay away from the 'eadlesses next door, that'l do fer a start. If ye're lookin' for a short cut downstairs, ye can jump a few platforms, 'n'op down the rabbit'ole." );
   locals[1] = 143;
   locals[2] = 144;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_116b;

   break;

   } // end switch

   say( "Thou shalt see! Just watch for the big duck pond, 'n keep to your left!" );
   locals[23] = 146;
   locals[24] = 147;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

   break;

   case 2:

      goto label_117e;

   break;

   } // end switch

   label_116b:;

   say( "I know m'way 'round'ere, I does!" );
   locals[45] = 149;
   print( 1, &locals[45] );
   func_0965();
   label_117e:;

   say( "Righto, then! I know when I ain't needed!" );
   locals[46] = 151;
   print( 1, &locals[46] );
   func_0965();
} // end func

conversation #130
string block 0x0e81, name Nystul

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[51];

   locals[1] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 1;
   locals[3] = 2;
   if ( private[0] == 0 ) {

      private[2] = 0;
   } // end if

   locals[4] = 43;
   if ( get_quest( 1, &locals[4] ) ) {

      if ( private[2] == 0 ) {

         private[2] = 1;
         say( "What . . . stay where thou art, @GS8! What is it that has happened?" );
         locals[5] = 4;
         locals[6] = 5;
         locals[7] = 0;
         locals[26] = babl_menu( 0, &locals[5] );
         switch ( locals[26] ) {

         case 1:

         break;

         case 2:

            goto label_03e8;

         break;

         } // end switch

         say( "Forgive my tone, @SS1. 'Twas . . . a shock, to see this." );
         goto label_03ed;

         label_03e8:;

         say( "Then this was merely . . . justice." );
         goto label_03ed;

         label_03ed:;

         label_03ed:;

         locals[27] = 8;
         print( 1, &locals[27] );
         say( "I shall inform Lord British of what has happened." );
         func_0156();
      } // end if

   } // end if

   if ( game_mins <= 720 ) {

      say( "Good morning, @SS1." );
   } // end if

   if ( game_mins > 720 && game_mins <= 1080 ) {

      say( "Good afternoon, @SS1." );
   } // end if

   if ( game_mins > 1080 ) {

      say( "Good evening, @SS1." );
   } // end if

   locals[28] = 13;
   locals[29] = 14;
   locals[30] = 15;
   locals[31] = 0;
   locals[49] = babl_menu( 0, &locals[28] );
   switch ( locals[49] ) {

   case 1:

      goto label_0479;

   break;

   case 2:

      goto label_0497;

   break;

   case 3:

      goto label_049a;

   break;

   } // end switch

   label_0479:;

   locals[50] = 110;
   if ( get_quest( 1, &locals[50] ) == 1 ) {

      say( "A bit of trouble with these invading soldiers, @SS1." );
   } else {

      say( "All quiet, @SS1." );
   } // end if

   goto label_049a;

   label_0497:;

   say( "Fine, @SS1." );
   label_049a:;

   label_049a:;

   locals[51] = 19;
   print( 1, &locals[51] );
} // end func

conversation #131
string block 0x0e82, name Charles

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_068c();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[1];

   locals[1] = param1[0]play_hunger >= 280 && param1[0]play_hunger <= 280 + 7;
   goto label_0377;

   label_0377:;

   return locals[1];
} // end func

void func_037f() {

   int locals[6];

   locals[4] = 1017;
   locals[5] = 1;
   if ( find_inv( 2, &locals[5], &locals[4] ) == 0 ) {

      locals[1] = 0;
   } else {

      locals[2] = 280;
      while ( locals[2] <= 280 + 7 ) {

         locals[3] = find_inv( 2, &locals[6], &locals[2] );
         locals[6] = 1;
         if ( locals[3] > 0 ) {

            locals[1] = locals[3];
         } else {

            locals[2] = locals[2] + 1;
         } // while

         locals[1] = 0;
      } // end if

   } // end if

   return locals[1];
} // end func

void func_03fa() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_04fe( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_04fe( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 048c
   } // end switch

   locals[1] = locals[4];
   goto label_04f6;

   label_04f6:;

   return locals[1];
} // end func

void func_04fe() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 05ca
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_05fe() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_0665() {

   int locals[2];

   locals[1] = 128 + 15;
   locals[2] = param1[0]play_hunger + 1;
   set_quest( 2, &locals[2], &locals[1] );
} // end func

void func_068c() {

   int locals[199];

   if ( npc_goal == 10 ) {

      npc_goal = 8;
   } // end if

   private[78] = 0;
   if ( private[0] == 0 ) {

      func_0b34();
      private[37] = 0;
      private[74] = 0;
      private[82] = 1;
      private[83] = 0;
      private[75] = 0;
      private[79] = 1;
      private[81] = 1;
      private[80] = 0;
      private[76] = 0;
      private[77] = 0;
      locals[5] = 0;
      locals[7] = sex( 2, &locals[11], &locals[10] );
      locals[10] = 6;
      locals[11] = 7;
   } // end if

   if ( private[82] ) {

      if ( func_037f() ) {

         private[81] = 0;
         locals[8] = 1;
         func_1870();
      } // end if

   } // end if

   locals[12] = 109;
   if ( get_quest( 1, &locals[12] ) ) {

   } else {

      say( "If thou wilt wait a moment, Avatar, I think Lord British is about to commence his speech." );
      func_0165();
   } // end if

   locals[13] = 1;
   locals[14] = 10001;
   if ( x_clock( 2, &locals[14], &locals[13] ) == 16 ) {

      locals[15] = 273;
      locals[16] = 1;
      if ( find_inv( 2, &locals[16], &locals[15] ) ) {

         locals[17] = 64;
         if ( get_quest( 1, &locals[17] ) ) {

            say( "Avatar, we have very little time! Art thou ready to begin?" );
            locals[18] = 10;
            locals[19] = 0;
            locals[39] = babl_menu( 0, &locals[18] );
            if ( locals[39] == 1 ) {

            } // end if

            locals[40] = 11;
            print( 1, &locals[40] );
            locals[41] = 2;
            func_0665( &locals[41] );
            npc_goal = 8;
            func_0165();
         } else {

            say( "We cannot begin the ceremony with Mors Gotha rampaging loose in the castle! She must be stopped, Avatar!" );
            npc_goal = 12;
            func_0156();
         } // end if

      } else {

         say( "Avatar, where is the horn of Praecor Loth? We must have it if we can hope to destroy the gem now!" );
         npc_goal = 12;
         func_0156();
      } // end if

   } // end if

   locals[42] = 115;
   if ( get_quest( 1, &locals[42] ) == 1 ) {

      if ( locals[5] == 0 ) {

         say( "Avatar, what's going on? I was in the kitchen just now, and Charles absolutely refused to bring me bread from the storeroom! I simply can't work unless I have enough food." );
         locals[43] = 15;
         locals[44] = 16;
         locals[45] = 0;
         locals[64] = babl_menu( 0, &locals[43] );
         switch ( locals[64] ) {

         case 1:

            goto label_0836;

         break;

         case 2:

            goto label_0833;

         break;

         } // end switch

         label_0833:;

         say( "But Avatar, I am not a young @SS7 like thee, I cannot survive so easily without sustenance." );
         label_0836:;

         say( "I beg thee, settle the matter quickly." );
         locals[5] = 1;
         func_0165();
      } else {

         say( "Please, Avatar, I am so weak now. Speak to the servants, settle the matter peaceably!" );
         func_0156();
      } // end if

   } // end if

   if ( private[74] ) {

      say( "Hast thou brought Mors Gotha's book with thee?" );
      locals[65] = 21;
      locals[66] = 22;
      locals[67] = 0;
      locals[86] = babl_menu( 0, &locals[65] );
      switch ( locals[86] ) {

      case 1:

         func_1352();
      break;

      case 2:

      break;

      } // end switch

      say( "Please, fetch it for me... I must see it!" );
      func_0156();
   } // end if

   if ( private[75] ) {

      say( "Hast thou found the time and place?" );
      locals[87] = 25;
      locals[88] = 26;
      locals[89] = 0;
      locals[108] = babl_menu( 0, &locals[87] );
      switch ( locals[108] ) {

      case 1:

         func_156b();
      break;

      case 2:

      break;

      } // end switch

      say( "You must keep looking, then -- someone must know!" );
      func_0156();
   } // end if

   if ( private[76] ) {

      say( "Dost thou know the time?" );
      locals[109] = 29;
      locals[110] = 30;
      locals[111] = 0;
      locals[130] = babl_menu( 0, &locals[109] );
      switch ( locals[130] ) {

      case 1:

         func_15ea();
      break;

      case 2:

      break;

      } // end switch

      say( "Then you must keep looking, then -- someone must know!" );
      func_0156();
   } // end if

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_03fa();
   locals[3] = private[37] > 0;
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[131] = locals[4];
   0 == locals[131];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[131] ) {

      locals[132] = 1;
      func_0c2f( &locals[132], 69 );
      locals[2] = 1;
   } else {

      if ( private[0] == 0 && locals[2] == 0 ) {

         say( "Ah, @GS8, 'tis quite a mess we are in. Come, what may I do for thee?" );
      } else {

         if ( locals[1] ) {

            say( "Avatar, I am glad thou hast come to see me!" );
         } else {

            say( "What brings thee to see me, Avatar?" );
         } // end if

      } // end if

   } // end if

   label_09a8:;

   if ( !locals[2] && !locals[1] ) {

      locals[6] = 1;
   } else {

      locals[6] = 0;
   } // end if

   locals[8] = func_037f();
   locals[9] = func_1ea6();
   if ( private[81] ) {

      private[81] = 1 - locals[8];
   } // end if

   if ( locals[6] ) {

      locals[6] = 1 - locals[8];
   } // end if

   locals[154] = locals[2];
   locals[133] = 35;
   locals[155] = locals[1];
   locals[134] = 36;
   locals[156] = private[81];
   locals[135] = 37;
   locals[157] = private[36];
   locals[136] = 38;
   locals[158] = locals[3];
   locals[137] = 39;
   locals[159] = locals[6];
   locals[138] = 40;
   locals[160] = locals[9];
   locals[139] = 41;
   locals[140] = 0;
   locals[175] = babl_fmenu( 0, &locals[133], &locals[154] );
   switch ( locals[175] ) {

   case 35:

      locals[176] = 0;
      func_0c2f( &locals[176], 69 );
   break;

   case 36:

      locals[177] = 0;
      func_0c2f( &locals[177], 69 );
   break;

   case 37:

      func_0c1f();
   break;

   case 38:

      func_0dab();
   break;

   case 39:

      func_05fe();
   break;

   case 40:

      func_0165();
   break;

   case 41:

      func_1870();
   break;

   } // end switch

   if ( private[78] ) {

      say( "I see there is no use talking to thee anymore right now." );
      func_0156();
   } else {

      say( "If there is nothing more, @GS8, I must return to my work." );
   } // end if

   locals[178] = 44;
   locals[179] = 45;
   locals[180] = 0;
   locals[199] = babl_menu( 0, &locals[178] );
   switch ( locals[199] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "What wouldst thou like to talk about, then?" );
      goto label_09a8;

   break;

   } // end switch

} // end func

void func_0b34() {

   int locals[1];

   private[55][1] = 47;
   private[55][2] = 48;
   private[55][3] = 49;
   private[55][4] = 50;
   private[55][5] = 51;
   private[55][6] = 52;
   private[55][7] = 53;
   private[55][8] = 54;
   private[55][9] = 55;
   private[55][10] = 56;
   private[2][1] = 15;
   private[2][2] = 128 + 5;
   private[2][3] = 256 + 106;
   private[2][4] = 256 + 107;
   private[2][5] = 64 + 8;
   private[2][6] = 0;
   private[2][7] = 1;
   private[2][8] = 2;
   private[2][9] = 4;
   private[2][10] = 9;
   private[18][1] = 8;
   private[18][2] = 12;
   private[18][3] = 13;
   private[18][4] = 64 + 1;
   private[34] = 10;
   private[35] = 4;
   private[36] = 1;
   private[71] = 57;
} // end func

void func_0c1f() {

   say( "Since last we met, I have been hard at work restoring the study of magic in Britannia to its former level. Some of my research is documented in "A Safe Passage Through Britannia" -- thou shouldst take a look, as it touches on some of thine own experiences in the Stygian Abyss." );
   private[81] = 0;
} // end func

void func_0c2f() {

   int locals[2];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( !param1[0]play_hunger ) {

      if ( private[73] ) {

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      } else {

         private[18][0] = private[18][0] + 1024;
      } // end if

   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      if ( param1[0]play_hunger ) {

         say( "@GS8, I see thou art joining us in this unexpectedly protracted reunion! Listen, I wish to discuss with thee my thoughts on our situation." );
      } else {

         func_0ec9();
      } // end if

   } else {

      if ( 1 == locals[1] ) {

         if ( param1[0]play_hunger ) {

            say( "Ah, Avatar, I have been meaning to speak with thee." );
         } else {

            func_1073();
         } // end if

      } else {

         if ( 2 == locals[1] ) {

            if ( param1[0]play_hunger ) {

               say( "Avatar, this is the most extraordinary thing I have ever heard of!" );
            } else {

               func_1168();
            } // end if

         } else {

            if ( 4 == locals[1] ) {

               if ( param1[0]play_hunger ) {

                  say( "Avatar, I am interested to hear of thy latest findings." );
               } else {

                  func_11fb();
               } // end if

            } else {

               if ( 8 == locals[1] ) {

                  func_1101();
               } else {

                  if ( 9 == locals[1] ) {

                     if ( param1[0]play_hunger ) {

                        say( "I have had a new idea concerning thy interplanar vagrancy." );
                     } else {

                        func_129d();
                     } // end if

                  } else {

                     if ( 12 == locals[1] ) {

                        func_1e23();
                     } else {

                        if ( 13 == locals[1] ) {

                           func_115d();
                        } else {

                           if ( 15 == locals[1] ) {

                              say( "Avatar, the time of the ritual is almost at hand!" );
                              func_155e();
                           } else {

                              if ( 65 == locals[1] ) {

                                 func_17e6();
                              } else {

                                 if ( 133 == locals[1] ) {

                                    if ( param1[0]play_hunger ) {

                                       locals[2] = 65;
                                       print( 1, &locals[2] );
                                       say( "HA HA HA, thou hast made a djinn-bottle of thyself, Avatar!" );
                                    } else {

                                       func_12e4();
                                    } // end if

                                 } else {

                                    if ( 362 == locals[1] ) {

                                       func_12ef();
                                    } else {

                                       if ( 363 == locals[1] ) {

                                          if ( param1[0]play_hunger ) {

                                             say( "So, 'tis true -- thou hast obtained the Horn of Praecor Loth, a thing out of legend!" );
                                          } else {

                                             func_1518();
                                          } // end if

                                       } else {

                                          if ( 72 == locals[1] ) {

                                             if ( param1[0]play_hunger ) {

                                                say( "You've done it, Avatar!  We're almost there!" );
                                             } else {

                                                func_1553();
                                             } // end if

                                          } // end if

                                       } // end if

                                    } // end if

                                 } // end if

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_0dab() {

   int locals[52];

   label_0db0:;

   say( "Of course -- I always have time to teach thee." );
   locals[1] = 70;
   locals[2] = 71;
   locals[3] = 72;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0e04;

   break;

   case 2:

      goto label_0e46;

   break;

   case 3:

      return;

   break;

   } // end switch

   label_0e04:;

   say( "Certainly." );
   locals[23] = 7;
   locals[24] = 10001;
   if ( x_skills( 2, &locals[24], &locals[23] ) ) {

      locals[25] = 74;
      print( 1, &locals[25] );
   } else {

      locals[26] = 75;
      print( 1, &locals[26] );
      say( "I'm afraid that for the moment this is all you will be able to hold." );
      return;

      label_0e46:;

      say( "Ah yes, the subtlety in working runic magic lies in the hand motions. Let me instruct thee..." );
      locals[27] = 9;
      locals[28] = 10001;
      if ( x_skills( 2, &locals[28], &locals[27] ) ) {

         locals[29] = 78;
         print( 1, &locals[29] );
      } else {

         locals[30] = 79;
         print( 1, &locals[30] );
         say( "Hmmm. Thou shouldst perhaps take a break, try thy hand at exploring for awhile, and then perhaps we will try again." );
      } // end if

   } // end if

   say( "Wouldst thou like to learn more?" );
   locals[31] = 82;
   locals[32] = 83;
   locals[33] = 0;
   locals[52] = babl_menu( 0, &locals[31] );
   switch ( locals[52] ) {

   case 1:

      goto label_0db0;

   break;

   case 2:

   break;

   } // end switch

} // end func

void func_0ec9() {

   int locals[111];

   say( "'Tis a staggeringly huge spell -- I had not thought even the Guardian could create such an enormous amount of blackrock -- but 'tis also a very crude casting, no subtlety about it. If I had the book it was cast from, I'd swear I could reverse it!" );
   locals[1] = 85;
   locals[2] = 86;
   locals[3] = 87;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0f31;

   break;

   case 2:

      goto label_1032;

   break;

   case 3:

   break;

   } // end switch

   locals[23] = 88;
   print( 1, &locals[23] );
   say( "'Tis the curse of true mastery, I suppose, to be sensitive to such things." );
   label_0f31:;

   say( "'Tis as if the caster had so much power he thought there was no need to work skillfully. As it is, the ether has been violently disrupted, and I should not be surprised if there were aftershocks and side effects in our own and other realities." );
   locals[24] = 91;
   locals[25] = 92;
   locals[26] = 93;
   locals[27] = 0;
   locals[45] = babl_menu( 0, &locals[24] );
   switch ( locals[45] ) {

   case 1:

      goto label_0f85;

   break;

   case 2:

      goto label_0fde;

   break;

   case 3:

      return;

   break;

   } // end switch

   label_0f85:;

   label_0f85:;

   label_0f85:;

   say( "'Tis hard to predict -- possibly some sort of "echo" effect, wherein the spell effect might replicate itself on a smaller scale, like an echo repeating and dying away. 'Tis common in his castings. I shouldn't wonder if we see some smaller replica of the gem, just as we saw in his assault a year ago." );
   locals[46] = 95;
   locals[47] = 96;
   locals[48] = 97;
   locals[49] = 0;
   locals[67] = babl_menu( 0, &locals[46] );
   switch ( locals[67] ) {

   case 1:

      goto label_0fde;

   break;

   case 2:

      goto label_1032;

   break;

   case 3:

   break;

   } // end switch

   private[78] = 1;
   return;

   label_0fde:;

   label_0fde:;

   say( "The same ether surrounds and permeates all the realities. An etherstorm this size might have far-reaching effects. Such things are hard to estimate." );
   locals[68] = 99;
   locals[69] = 100;
   locals[70] = 101;
   locals[71] = 0;
   locals[89] = babl_menu( 0, &locals[68] );
   switch ( locals[89] ) {

   case 1:

      goto label_0f85;

   break;

   case 2:

      goto label_1032;

   break;

   case 3:

      return;

   break;

   } // end switch

   label_1032:;

   label_1032:;

   label_1032:;

   say( "I know not, save that it blocks the flow of the ether, and thus we can cast only the simplest spells within the castle." );
   locals[90] = 103;
   locals[91] = 104;
   locals[92] = 0;
   locals[111] = babl_menu( 0, &locals[90] );
   switch ( locals[111] ) {

   case 1:

   break;

   case 2:

      goto label_0f85;

   break;

   } // end switch

} // end func

void func_1073() {

   int locals[44];

   say( "Well, I am curious: how goes thy exploration of the castle?" );
   locals[1] = 106;
   locals[2] = 107;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_10b8;

   break;

   case 2:

      goto label_10fb;

   break;

   } // end switch

   label_10b8:;

   say( "It is important that you become thoroughly acquainted with it. However, do not omit to survey the area beneath it -- some of the caves and tunnels were built centuries ago. Perhaps the depths hold mysteries worth investigating." );
   locals[23] = 109;
   locals[24] = 110;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      return;

   break;

   case 2:

   break;

   } // end switch

   say( "That is true; but I beg thee, Avatar, do not forget what I have told thee." );
   return;

   label_10fb:;

   say( "That is wise of thee -- some of the tunnels 'neath Lord British's castle are thousands of years old. Who knows what might be found there?" );
} // end func

void func_1101() {

   int locals[23];

   say( "She was so beautiful! Why did this have to happen to her?" );
   locals[1] = 114;
   locals[2] = 115;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_1149;

   break;

   } // end switch

   say( "I'm an old man, @GS8! It should have been me." );
   func_0165();
   label_1149:;

   say( "Aye, when we catch the traitor..." );
   locals[23] = 118;
   print( 1, &locals[23] );
} // end func

void func_115d() {

   say( "Nelson, my colleague, the gentle one. He would never even have thought to suspect Patterson! Never again shall I be able to trust our people..." );
} // end func

void func_1168() {

   int locals[44];

   say( "Well... it is most extraordinary, is it not? Miranda tells me thou hast travelled to a place outside of Britannia -- that the violence of the Guardian's interdimensional magic has cracked the very walls between the worlds!" );
   locals[1] = 121;
   locals[2] = 122;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_11ad;

   break;

   case 2:

      goto label_11b2;

   break;

   } // end switch

   label_11ad:;

   say( "As yet, I know not, but 'tis possible the effect will worsen, extending to two or even three more planes of existence." );
   return;

   label_11b2:;

   say( "I know not. 'tis possible a certain symmetry exists among the planes.  Was the plane you visited connected to the Guardian in some way?" );
   locals[23] = 125;
   locals[24] = 126;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

   break;

   case 2:

      goto label_11f5;

   break;

   } // end switch

   say( "Hmmm... 'tis as I thought. I must ponder this matter further. I wish I had that spellbook!" );
   return;

   label_11f5:;

   say( "Hmmm... 'tis a mystery. I wish I had that spellbook!" );
} // end func

void func_11fb() {

   int locals[44];

   say( "I have been thinking about that black jewel thou didst bring back from the prison tower. 'Tis clear that these gems form a part of the Guardian's magic -- the spell is more intricate than I had first thought. Thou shouldst collect more of these, if you find them." );
   locals[1] = 130;
   locals[2] = 131;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      return;

   break;

   case 2:

   break;

   } // end switch

   say( "The Guardian's spell has generated a certain symmetry -- an enormous faceted jewel surrounds the castle, a smaller one appears in the basement's center, then you find a tiny one in the Tower. Perhaps a disruption of this symmetry would weaken the spell." );
   locals[23] = 133;
   locals[24] = 134;
   locals[25] = 135;
   locals[26] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_1292;

   break;

   case 2:

      goto label_1297;

   break;

   case 3:

      return;

   break;

   } // end switch

   label_1292:;

   say( "Remember, @GS8, this is magic of the deepest kind, not just a bit of swordplay. Here such principles as beauty and resonance command great power." );
   return;

   label_1297:;

   say( "Why should symmetry apply to the towers and arches of Castle British? There is strength in balanced and precise construction -- if we shift the building blocks of the spell, we might be able to bring it tumbling down!" );
} // end func

void func_129d() {

   int locals[22];

   say( "Just think -- on each of the planes thou hast traveled on, the Guardian hath in the past accomplished some prodigious work of sorcery! Coincidence, my dear Avatar? I think not!" );
   locals[1] = 139;
   locals[2] = 140;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "There must be some connection between the dimensions where the Guardian has unleashed his most powerful sorcery! That is why we have become connected to them. If I had the original spell with which it was cast, perhaps I could reverse this connection, dissipate along those connections the power that maintains the gem!" );
} // end func

void func_12e4() {

   say( "Seriously, Avatar, 'twill someday prove useful to us -- when thou dost choose to release thy captive, 'twill issue from thy lips with great force." );
} // end func

void func_12ef() {

   int locals[23];

   say( "Avatar, I heard thou didst bring home an arcane book from abroad -- may I look at it?" );
   locals[1] = 144;
   locals[2] = 145;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_1352();
   break;

   case 2:

   break;

   } // end switch

   locals[23] = 120;
   if ( get_quest( 1, &locals[23] ) ) {

   } else {

      say( "Please bring it to me immediately. It may be extremely important to our survival." );
      private[74] = 1;
      func_0156();
   } // end if

} // end func

void func_1352() {

   int locals[29];

   say( "Thank thee, Avatar. This may prove most important." );
   label_135a:;

   locals[1] = find_barter( 1, &locals[2] );
   locals[2] = 312;
   if ( locals[1] ) {

      locals[3] = 1;
      give_ptr_npc( 2, &locals[3], &locals[1] );
      private[74] = 0;
      locals[4] = 120;
      locals[5] = 1;
      set_quest( 2, &locals[5], &locals[4] );
      locals[6] = 106;
      locals[7] = 0;
      set_quest( 2, &locals[7], &locals[6] );
      func_1406();
   } else {

      say( "Where is it? Dost thou have it with thee?" );
      locals[8] = 149;
      locals[9] = 150;
      locals[10] = 0;
      locals[29] = babl_menu( 0, &locals[8] );
      switch ( locals[29] ) {

      case 1:

         goto label_135a;

      break;

      case 2:

      break;

      } // end switch

      say( "Please hurry -- It is most vital!" );
      private[74] = 1;
      func_0156();
   } // end if

} // end func

void func_1406() {

   int locals[17];

   locals[1] = 0;
   locals[2] = 0;
   locals[3] = 0;
   locals[4] = 0;
   locals[1] = get_quest( 1, &locals[5] );
   locals[5] = 7;
   locals[6] = 2;
   locals[7] = 10001;
   if ( x_clock( 2, &locals[7], &locals[6] ) > 7 ) {

      locals[2] = 1;
   } // end if

   locals[3] = get_quest( 1, &locals[8] );
   locals[8] = 14;
   locals[9] = 1;
   locals[10] = 10001;
   if ( x_clock( 2, &locals[10], &locals[9] ) == 14 ) {

      locals[4] = 1;
   } // end if

   if ( locals[1] && locals[2] && locals[3] && locals[4] ) {

      locals[11] = 1;
      locals[12] = 15;
      x_clock( 2, &locals[12], &locals[11] );
      private[74] = 0;
      say( "With the text of this spell in my hands, I shall be able to unravel the Guardian's spell like a clever knot!" );
      locals[13] = 107;
      if ( get_quest( 1, &locals[13] ) == 0 ) {

         locals[14] = 273;
         locals[15] = 1;
         if ( find_inv( 2, &locals[15], &locals[14] ) ) {

            say( "Thou hast the Horn of Praecor Loth with thee -- make sure thou dost keep it  safe, for we shall need it soon!" );
            locals[16] = 107;
            locals[17] = 1;
            set_quest( 2, &locals[17], &locals[16] );
         } else {

            say( "Make sure thou dost retrieve Praecor Loth's horn, and keep it in a safe place, Avatar -- we shall need it soon!" );
         } // end if

      } // end if

      func_155e();
   } // end if

   private[74] = 0;
   say( "Aha! This is the very thing we need! With this in my hands, I shall unravel the Guardian's spell as if it were a clever knot! Thou hast done well, Avatar. I shall require a little solitude now, to study this tome." );
   npc_goal = 1;
   func_0147();
} // end func

void func_1518() {

   int locals[3];

   locals[1] = 21;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 105;
   if ( get_quest( 1, &locals[3] ) == 1 ) {

      say( "With the elemental within thee, thou now hast the means to blow the Horn of Praecor Loth! If we can but weaken the spell holding the gem in place, perhaps even blackrock shall fall before its might." );
   } else {

      say( "'Tis said that with this weapon Praecor Loth did lord it over a hundred battlefields, but that none but he could wield the weapon. If we are to enlist its force to shatter the gem, we must find some way to blow it." );
   } // end if

} // end func

void func_1553() {

   say( "What I mean, thou hast found all the gems! Feel how the gem quivers at the touch, and hums strange harmonies! The spell that supports it is bent and twisted, its geometry warped from its shape. With its lines of magical support severed, all we need do is strike the shattering blow." );
} // end func

void func_155e() {

   say( "We need know only two more things -- what was the place and time of the original casting, when the Guardian's agent performed the ceremony to bring the dark jewel down on us?" );
   func_156b();
} // end func

void func_156b() {

   int locals[24];

   say( "Where did it happen?" );
   locals[2] = 161;
   locals[3] = 162;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      goto label_15dd;

   break;

   case 2:

   break;

   } // end switch

   locals[1] = babl_ask( 0 );
   say( "\1@SS1\0" );
   locals[24] = 164;
   if ( contains( 2, &locals[1], &locals[24] ) ) {

      say( "Yes, the throne room. My calculations agree with thee there." );
      private[75] = 0;
      func_15ea();
   } else {

      say( "Nay, my calculations say this is impossible." );
      label_15dd:;

      say( "Thou must go and ask those left in the castle -- someone must have seen or heard something!" );
      private[75] = 1;
      func_0156();
   } // end if

} // end func

void func_15ea() {

   int locals[25];

   say( "And now, what time of night was it?" );
   locals[2] = 169;
   locals[3] = 170;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      goto label_166f;

   break;

   case 2:

   break;

   } // end switch

   locals[1] = babl_ask( 0 );
   say( "\1@SS1\0" );
   locals[24] = 172;
   (contains( 2, &locals[1], &locals[24] ) || contains( 2, &locals[1], &locals[25] ));  // expr. has value on stack!
   if ( locals[25] = 173 ) {

      say( "Four o'clock in the morning, yes, in the throne room as dawn broke. My calculations are complete! Now we may... what's that noise?" );
      private[76] = 0;
      func_167c();
   } else {

      say( "Nay, my calculations say this is impossible." );
      label_166f:;

      say( "Thou must go and ask those left in the castle -- someone must have seen or heard something!" );
      private[76] = 1;
      func_0156();
   } // end if

} // end func

void func_167c() {

   int locals[43];

   locals[1] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 177;
   locals[3] = 178;
   locals[4] = 1;
   locals[5] = 1;
   locals[6] = 10001;
   locals[7] = x_clock( 2, &locals[6], &locals[5] ) + 1;
   x_clock( 2, &locals[7], &locals[4] );
   locals[8] = 179;
   print( 1, &locals[8] );
   locals[9] = 135;
   switch_pic( 1, &locals[9] );
   say( "A... Avatar... I... soldiers are pouring out of the gem, an army of them! If thou hast any hope of saving..." );
   locals[10] = 181;
   print( 1, &locals[10] );
   locals[11] = 182;
   locals[12] = 183;
   locals[13] = 0;
   locals[32] = babl_menu( 0, &locals[11] );
   switch ( locals[32] ) {

   case 1:

      goto label_1774;

   break;

   case 2:

   break;

   } // end switch

   locals[33] = 47;
   switch_pic( 1, &locals[33] );
   locals[34] = 54;
   if ( get_quest( 1, &locals[34] ) ) {

      locals[35] = 184;
      print( 1, &locals[35] );
   } else {

      locals[36] = 185;
      print( 1, &locals[36] );
   } // end if

   say( "MY soldiers." );
   label_1774:;

   locals[37] = 47;
   switch_pic( 1, &locals[37] );
   locals[38] = 54;
   if ( get_quest( 1, &locals[38] ) ) {

      locals[39] = 187;
      print( 1, &locals[39] );
   } else {

      locals[40] = 188;
      print( 1, &locals[40] );
   } // end if

   say( "Led me right to @SS1, Julia." );
   locals[41] = 190;
   print( 1, &locals[41] );
   say( "Let's go." );
   private[77] = 1;
   locals[42] = 110;
   locals[43] = 1;
   set_quest( 2, &locals[43], &locals[42] );
   func_0165();
} // end func

void func_17e6() {

   int locals[44];

   say( "So, the small gem thou didst find merged with the larger! This bodes well for us!" );
   locals[1] = 193;
   locals[2] = 194;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_1829;

   break;

   } // end switch

   label_1829:;

   say( "The Guardian is a careless spellcaster! The tiny gem in the other world is an echo in the ether, just like the Gateway Gem, an echo of the first, enormous sphere he placed on our world." );
   locals[23] = 196;
   locals[24] = 197;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_186a;

   break;

   case 2:

   break;

   } // end switch

   say( "'Tis a subtle point, I grant thee!" );
   label_186a:;

   say( "As these echoes come together, they begin to build into a shout, which may bring this gem tumbling right down around our ears!" );
} // end func

void func_1870() {

   int locals[223];

   locals[7] = 0;
   locals[8] = 0;
   locals[3] = 280;
   if ( private[82] ) {

      if ( private[83] ) {

         say( "Hast thou had any ideas yet, Avatar? I do sense strongly the presence of the Guardian's magic!" );
         locals[24] = 201;
         locals[25] = 202;
         locals[26] = 0;
         locals[45] = babl_menu( 0, &locals[24] );
         switch ( locals[45] ) {

         case 1:

            goto label_190c;

         break;

         case 2:

         } else {

         break;

         } // end switch

         say( "Well, Avatar! I sense thou dost carry some element of Guardian's spellcraft with thee! What is it thou hast found?" );
         locals[46] = 204;
         locals[47] = 205;
         locals[48] = 0;
         locals[67] = babl_menu( 0, &locals[46] );
         switch ( locals[67] ) {

         case 1:

            goto label_195a;

         break;

         case 2:

         break;

         } // end switch

         label_190c:;

         say( "May I examine it?" );
         locals[68] = 207;
         print( 1, &locals[68] );
      } // end if

      label_191d:;

      locals[69] = 208;
      locals[70] = 209;
      locals[71] = 0;
      locals[90] = babl_menu( 0, &locals[69] );
      switch ( locals[90] ) {

      case 1:

         goto label_199a;

      break;

      case 2:

         goto label_195a;

      } // end if

   break;

   } // end switch

   label_195a:;

   label_195a:;

   say( "It should bear some relation to other aspects of the Guardian's spell -- I cannot tell thee more. Dost thou have some thing like that?" );
   locals[91] = 211;
   locals[92] = 212;
   locals[93] = 0;
   locals[112] = babl_menu( 0, &locals[91] );
   switch ( locals[112] ) {

   case 1:

      goto label_199a;

   break;

   case 2:

      goto label_1a72;

   break;

   } // end switch

   label_199a:;

   label_199a:;

   locals[8] = 0;
   locals[7] = 0;
   locals[3] = 280;
   while ( locals[7] <= 7 ) {

      find_barter_total( 4, &locals[6], &locals[5], &locals[4], &locals[3] );
      locals[7] = locals[7] + 1;
      locals[3] = locals[3] + 1;
      locals[8] = locals[8] + locals[6];
   } // while

   locals[7] = 0;
   locals[3] = 280;
   locals[113] = 272;
   if ( find_barter( 1, &locals[113] ) ) {

      say( "Avatar, that's disgusting!" );
   } else {

      switch ( locals[8] ) {

      case 0:

         say( "There is nothing of the Guardian's here! Hast thou anything else to show me?" );
      break;

      case 1:

         say( "I can only examine one at a time, Avatar! Please choose one." );
      break;

      case 1:

         locals[2] = find_barter( 1, &locals[114] );
         locals[114] = 1017;
         show_inv( 2, &locals[16], &locals[9] );
         if ( locals[7] <= 6 ) {

            locals[7] = locals[7] + 1;
            if ( locals[15] == locals[2] ) {

               if ( func_035a( &locals[8] ) ) {

               } else {

               } // end if

            break;

         } // end if

         say( "No, that is not the item I am seeking. Perhaps thou hast another that might be the one?" );
         goto label_191d;

         label_1a72:;

         say( "Hmmm... thou dost definitely have some important artifact on thy person, but this is not it. Perhaps thou shouldst take a close look at the contents of thy pockets, and then speak with me again." );
         private[83] = 1;
      } // end if

      private[82] = 0;
      locals[115] = 0;
      locals[116] = 65535;
      locals[117] = 65535;
      locals[118] = 65535;
      locals[119] = 65535;
      locals[120] = 65535;
      locals[121] = 65535;
      x_obj_stuff( 9, &locals[121], &locals[120], &locals[119], &locals[118], &locals[117], &locals[23], &locals[116], &locals[115], &locals[2] );
      locals[23] == 1;  // expr. has value on stack!
      say( "But Avatar, I have already treated this gem!" );
      } // end switch

      say( "Aha! Thou hast it!" );
      locals[122] = 220;
      print( 1, &locals[122] );
      locals[123] = 1;
      give_ptr_npc( 2, &locals[123], &locals[2] );
      locals[124] = 1017;
      take_from_npc( 1, &locals[124] );
      locals[125] = 1;
      locals[126] = 65535;
      locals[127] = 1;
      locals[128] = 65535;
      locals[129] = 65535;
      locals[130] = 65535;
      locals[131] = 65535;
      locals[132] = 65535;
      x_obj_stuff( 9, &locals[132], &locals[131], &locals[130], &locals[129], &locals[128], &locals[127], &locals[126], &locals[125], &locals[2] );
      locals[133] = 221;
      print( 1, &locals[133] );
      say( "Thou shouldst bring this down to the larger gem in the sewers, and experiment. There might be some... interesting effects." );
      locals[134] = 223;
      locals[135] = 224;
      locals[136] = 0;
      locals[155] = babl_menu( 0, &locals[134] );
      switch ( locals[155] ) {

      case 1:

         goto label_1bac;

      break;

      case 2:

      break;

      } // end switch

      say( "The Guardian's spell placed this jewel on a plane under his sorcerous dominion -- returning it to its source in Britannia may help upset his spell -- throw the balance of his designs into disorder." );
      say( "Go, then, and try it." );
      func_0147();
      label_1bac:;

      say( "Do so -- it may put a tangle in the Guardian's carefully spun web!" );
      func_0147();
   } else {

      label_1bb3:;

      say( "May I examine it?" );
      locals[156] = 229;
      print( 1, &locals[156] );
   } // end if

   label_1bc4:;

   locals[157] = 230;
   locals[158] = 231;
   locals[159] = 0;
   locals[178] = babl_menu( 0, &locals[157] );
   switch ( locals[178] ) {

   case 1:

   break;

   case 2:

      goto label_1cd2;

   break;

   } // end switch

   locals[8] = 0;
   locals[7] = 0;
   locals[3] = 280;
   while ( locals[7] <= 7 ) {

      find_barter_total( 4, &locals[6], &locals[5], &locals[4], &locals[3] );
      locals[7] = locals[7] + 1;
      locals[3] = locals[3] + 1;
      locals[8] = locals[8] + locals[6];
   } // while

   locals[179] = 272;
   if ( find_barter( 1, &locals[179] ) ) {

      say( "Avatar, that's disgusting!" );
   } else {

      switch ( locals[8] ) {

      case 0:

         say( "There is nothing of the Guardian's here! Hast thou anything else to show me?" );
      break;

      case 1:

         say( "I can only examine one item at a time, Avatar! Please choose one." );
      break;

      case 1:

         locals[2] = find_barter( 1, &locals[180] );
         locals[180] = 1017;
         show_inv( 2, &locals[16], &locals[9] );
         locals[7] = 0;
         if ( locals[7] <= 6 ) {

            locals[7] = locals[7] + 1;
            if ( locals[15] == locals[2] ) {

               if ( func_035a( &locals[8] ) ) {

               } else {

               } // end if

            break;

         } // end if

         say( "No, that is not the item I am seeking. Perhaps thou hast another that might be the one?" );
         goto label_1bc4;

         label_1cd2:;

         say( "I must see the jewel to treat it, Avatar." );
      } // end if

      locals[181] = 0;
      locals[182] = 65535;
      locals[183] = 65535;
      locals[184] = 65535;
      locals[185] = 65535;
      locals[186] = 65535;
      locals[187] = 65535;
      x_obj_stuff( 9, &locals[187], &locals[186], &locals[185], &locals[184], &locals[183], &locals[23], &locals[182], &locals[181], &locals[2] );
      locals[23] == 1;  // expr. has value on stack!
      say( "But Avatar, I have already treated this gem!" );
      } // end switch

      locals[188] = 238;
      print( 1, &locals[188] );
      locals[189] = 1;
      locals[190] = 65535;
      locals[191] = 1;
      locals[192] = 65535;
      locals[193] = 65535;
      locals[194] = 65535;
      locals[195] = 65535;
      locals[196] = 65535;
      x_obj_stuff( 9, &locals[196], &locals[195], &locals[194], &locals[193], &locals[192], &locals[191], &locals[190], &locals[189], &locals[2] );
      locals[197] = 1;
      give_ptr_npc( 2, &locals[197], &locals[2] );
      locals[198] = 1017;
      take_from_npc( 1, &locals[198] );
      locals[199] = 239;
      print( 1, &locals[199] );
      locals[200] = 2;
      locals[201] = 10001;
      if ( x_clock( 2, &locals[201], &locals[200] ) == 7 ) {

         say( "There! 'Tis the last one!" );
      } else {

         say( "Try this now, then!" );
         say( "Hast thou any others thou wouldst have me treat?" );
         locals[202] = 243;
         locals[203] = 244;
         locals[204] = 0;
         locals[223] = babl_menu( 0, &locals[202] );
         switch ( locals[223] ) {

         case 1:

            goto label_1bb3;

         break;

         case 2:

            return;

         } // end if

      } // end if

   break;

   } // end switch

} // end func

void func_1e23() {

   int locals[44];

   say( "Avatar, I have been thinking -- in thy travels, thou hast encountered a number of servants of the Guardian, is that not so?" );
   locals[1] = 246;
   locals[2] = 247;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "Perhaps one of them might have a copy of the spell the Guardian used in Britannia!" );
   locals[23] = 249;
   locals[24] = 250;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "If I can find a copy of that spell and gain some understanding of it, I may be able to reverse the mystic processes that keep the gem's structure stable. If only I knew when it had been cast . . ." );
} // end func

void func_1ea6() {

   int locals[12];

   locals[2] = 280;
   while ( locals[2] <= 280 + 7 ) {

      locals[4] = find_inv( 2, &locals[5], &locals[2] );
      locals[5] = 1;
      if ( locals[4] > 0 ) {

         locals[6] = 0;
         locals[7] = 65535;
         locals[8] = 65535;
         locals[9] = 65535;
         locals[10] = 65535;
         locals[11] = 65535;
         locals[12] = 65535;
         x_obj_stuff( 9, &locals[12], &locals[11], &locals[10], &locals[9], &locals[8], &locals[3], &locals[7], &locals[6], &locals[4] );
         if ( locals[3] == 0 ) {

            locals[1] = 1;
         } else {

         } // end if

         locals[2] = locals[2] + 1;
      } // while

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

conversation #132
string block 0x0e83, name Dupre

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05c5();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[82];

   locals[2] = 0;
   locals[5] = 0;
   if ( private[0] == 0 ) {

      func_0809();
      private[74] = 0;
      private[76] = 0;
      private[75] = 1;
   } // end if

   locals[6] = 109;
   if ( get_quest( 1, &locals[6] ) ) {

   } else {

      say( "Excuse me, @GS8, I want to hear what Lord British has to say!" );
      func_0165();
   } // end if

   locals[7] = 110;
   if ( get_quest( 1, &locals[7] ) ) {

      say( "What dost thou want of me, Avatar? Quick, start the ceremony, before we are overwhelmed!" );
      func_0156();
   } // end if

   locals[8] = 1;
   locals[9] = 10001;
   x_clock( 2, &locals[9], &locals[8] ) >= 9 && x_clock( 2, &locals[11], &locals[10] ) <= 11;  // expr. has value on stack!
   locals[10] = 1;
   if ( locals[11] = 10001 ) {

   } else {

      locals[12] = 116;
      if ( get_quest( 1, &locals[12] ) == 1 ) {

         if ( !private[74] ) {

            say( "Now that Lord British has agreed to act on our proposals, we have called off the strike." );
            private[74] = 1;
            locals[5] = 1;
         } // end if

      } // end if

      locals[13] = 115;
      if ( get_quest( 1, &locals[13] ) == 1 ) {

         func_0921();
      } // end if

   } // end if

} // end if

locals[1] = 0;
locals[2] = 0;
locals[4] = func_035a();
switch ( locals[4] ) {

case 0:

   private[73] = 0;
break;

case 1:

   private[73] = 1;
break;

locals[14] = locals[4];
0 == locals[14];  // expr. has value on stack!
locals[1] = 1;
} // end switch

if ( 1 == locals[14] ) {

   locals[15] = 1;
   func_0868( &locals[15], 69 );
   locals[2] = 1;
} else {

   if ( locals[5] ) {

   } else {

      if ( locals[2] ) {

      } else {

         if ( private[0] == 0 && locals[2] == 0 ) {

            say( "What is it, Avatar?" );
         } else {

            if ( locals[1] ) {

               say( "'Tis good to see thee, Avatar." );
            } else {

               say( "Yes? May I help thee?" );
            } // end if

         } // end if

      } // end if

   } // end if

   label_0721:;

   locals[37] = locals[2];
   locals[16] = 12;
   locals[38] = locals[1];
   locals[17] = 13;
   locals[39] = 1;
   locals[18] = 14;
   locals[40] = 1;
   locals[19] = 15;
   locals[20] = 0;
   locals[58] = babl_fmenu( 0, &locals[16], &locals[37] );
   switch ( locals[58] ) {

   case 12:

      locals[59] = 0;
      func_0868( &locals[59], 69 );
   break;

   case 13:

      locals[60] = 0;
      func_0868( &locals[60], 69 );
   break;

   case 14:

      func_1137();
   break;

   case 15:

      func_0165();
   break;

   } // end switch

   say( "Will there be anything else?" );
   locals[61] = 17;
   locals[62] = 18;
   locals[63] = 0;
   locals[82] = babl_menu( 0, &locals[61] );
   switch ( locals[82] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "Of course. What hast thou in mind?" );
      goto label_0721;

   break;

   } // end switch

} // end func

void func_0809() {

   private[2][1] = 9;
   private[2][2] = 10;
   private[2][3] = 11;
   private[18][1] = 1;
   private[18][2] = 3;
   private[18][3] = 7;
   private[18][4] = 8;
   private[18][5] = 13;
   private[18][6] = 68;
   private[34] = 3;
   private[35] = 6;
   private[36] = 0;
} // end func

void func_0868() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 1 == locals[1] ) {

      func_0ccb();
   } else {

      if ( 3 == locals[1] ) {

         func_0baa();
      } else {

         if ( 7 == locals[1] ) {

            func_0d78();
         } else {

            if ( 8 == locals[1] ) {

               func_0eb0();
            } else {

               if ( 9 == locals[1] ) {

                  func_0ffe();
               } else {

                  if ( 10 == locals[1] ) {

                     func_0ffe();
                  } else {

                     if ( 11 == locals[1] ) {

                        func_0ffe();
                     } else {

                        if ( 13 == locals[1] ) {

                           func_0f7b();
                        } else {

                           if ( 68 == locals[1] ) {

                              func_0dda();
                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_0921() {

   int locals[22];

   say( "Whatever it is thou needest, Avatar, thou wilt have to go elsewhere for it.  We members of the 'Domestic Management' are on strike." );
   locals[1] = 21;
   locals[2] = 22;
   locals[3] = 23;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_097d();
   break;

   case 2:

      func_09d9();
   break;

   case 3:

      func_0a35();
   break;

   } // end switch

} // end func

void func_097d() {

   int locals[22];

   say( "That is our new title. Nanna thought of it, and 'tis certainly an improvement over 'servants.' 'Servants' are only a step away from 'slaves,' after all." );
   locals[1] = 25;
   locals[2] = 26;
   locals[3] = 27;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b69();
   break;

   case 2:

      func_0a35();
   break;

   case 3:

      func_0a91();
   break;

   } // end switch

} // end func

void func_09d9() {

   int locals[22];

   say( "The outrage is the way we have always allowed ourselves to be treated. We only ask for respect and equality." );
   locals[1] = 29;
   locals[2] = 30;
   locals[3] = 31;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b76();
   break;

   case 2:

      func_0a91();
   break;

   case 3:

      func_0ad9();
   break;

   } // end switch

} // end func

void func_0a35() {

   int locals[22];

   say( "If thou were treated as a second-class citizen, thou might not think so." );
   locals[1] = 33;
   locals[2] = 34;
   locals[3] = 35;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0ad9();
   break;

   case 2:

      func_0b21();
   break;

   case 3:

      func_0b83();
   break;

   } // end switch

} // end func

void func_0a91() {

   int locals[22];

   say( "We are not trying to hinder anyone by going on strike, Avatar. We are trying to make a statement. Lord British will soon realize how much he relies on us, and how much he takes us for granted. Surely he will accede to our modest demands." );
   locals[1] = 37;
   locals[2] = 38;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b21();
   break;

   case 2:

      func_0b90();
   break;

   } // end switch

} // end func

void func_0ad9() {

   int locals[22];

   say( "This is a perfect time to demonstrate how vital we to are the function of the castle. I am sure that Lord British will not hesitate to grant us the status we deserve." );
   locals[1] = 40;
   locals[2] = 41;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b9d();
   break;

   case 2:

      func_0165();
   break;

   } // end switch

} // end func

void func_0b21() {

   int locals[22];

   say( "We would like to be called 'Domestic Management,' rather than 'servants,' for one thing. We would like more say in how the affairs of this castle are run -- especially considering that we do so much of the work! In general, we wish to be afforded the status that we deserve." );
   locals[1] = 43;
   locals[2] = 44;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b83();
   break;

   case 2:

      func_0165();
   break;

   } // end switch

} // end func

void func_0b69() {

   say( "I find thy attitude insulting." );
   func_0156();
} // end func

void func_0b76() {

   say( "Unless thou wilt address me as 'Domestic Management,' I shall not speak with thee." );
   func_0156();
} // end func

void func_0b83() {

   say( "It seems we have little left to discuss." );
   func_0156();
} // end func

void func_0b90() {

   say( "'Tis not blackmail, Avatar. 'Tis justice." );
   func_0147();
} // end func

void func_0b9d() {

   say( "Thou art of course entitled to thine opinions, @GS8." );
   func_0147();
} // end func

void func_0baa() {

   int locals[23];

   locals[1] = 50;
   print( 1, &locals[1] );
   say( "Avatar, given our situation, 'tis, 'tis hard enough already to keep the kitchen running smoothly!" );
   locals[2] = 52;
   locals[3] = 53;
   locals[4] = 54;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0c2c();
   break;

   case 2:

      func_0c14();
   break;

   case 3:

      func_0c2c();
   break;

   } // end switch

} // end func

void func_0c14() {

   int locals[1];

   locals[1] = 55;
   print( 1, &locals[1] );
   func_0c2c();
} // end func

void func_0c2c() {

   int locals[22];

   say( "It's that buffoon, Patterson!  Just now he upset an entire barrel of flour. The kitchen looks like a snowstorm! Can't we just keep the man out of the place?" );
   locals[1] = 57;
   locals[2] = 58;
   locals[3] = 59;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0c88();
   break;

   case 2:

      func_0ca3();
   break;

   case 3:

      func_0cb0();
   break;

   } // end switch

} // end func

void func_0c88() {

   int locals[1];

   locals[1] = 60;
   print( 1, &locals[1] );
   say( "The man would be more helpful were he locked in a broom closet!" );
   func_0156();
} // end func

void func_0ca3() {

   say( "Thou art no doubt correct, Avatar. If I see him in the kitchen again, I shall ask him." );
   func_0165();
} // end func

void func_0cb0() {

   int locals[1];

   locals[1] = 63;
   print( 1, &locals[1] );
   say( "I apologize for mine outburst, @GS8. But 'tis difficult to remain calm with that bumbler making a mess of things. I'm afraid I scolded him for the flour, but perhaps he has learned a lesson." );
   func_0165();
} // end func

void func_0ccb() {

   int locals[44];

   say( "Avatar, we would have a chance of surviving this imprisonment, except for one thing." );
   locals[1] = 66;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

   } // end if

   say( "Water! There is food here to last for months, but unless we think of something soon, we shall all die of thirst within the week." );
   locals[23] = 68;
   locals[24] = 69;
   locals[25] = 70;
   locals[26] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_0d51();
   break;

   case 2:

      func_0d5e();
   break;

   case 3:

      func_0d6b();
   break;

   } // end switch

} // end func

void func_0d51() {

   say( "Soon it shall be a problem on all of our minds. We should make finding a source of water our highest priority!" );
   func_0165();
} // end func

void func_0d5e() {

   say( "Aye, it does, but this accursed gem that traps us has also cut off the well! There is no other source of water here that I can think of." );
   func_0165();
} // end func

void func_0d6b() {

   say( "Nay, I have not been able to think of anything. If only magic would function properly here, Lord British could create all the water we need! But I understand that is impossible." );
   func_0165();
} // end func

void func_0d78() {

   int locals[22];

   say( "I have heard that thou hast found a river in another dimension. Avatar, thou hast done it! Thou hast found us a source of water!  Now we shall need someone to carry it to the castle. Hast thou talked with Dupre?" );
   locals[1] = 75;
   locals[2] = 76;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0dc0();
   break;

   case 2:

      func_0dcd();
   break;

   } // end switch

} // end func

void func_0dc0() {

   say( "Good! Now thou canst turn thy attentions to getting us out of this black prison." );
   func_0165();
} // end func

void func_0dcd() {

   say( "He hath been itching for something to do ever since the gem appeared. Methinks he is ideally suited for the job. Thou shouldst ask him if he wishes to accept the responsibility." );
   func_0165();
} // end func

void func_0dda() {

   int locals[22];

   say( "There have been three cases of food poisoning reported to me this morning! 'Tis most strange, since I fetched the food from the store-room myself. I know it was fresh." );
   locals[1] = 80;
   locals[2] = 81;
   locals[3] = 82;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0e36();
   break;

   case 2:

      func_0e43();
   break;

   case 3:

      func_0e50();
   break;

   } // end switch

} // end func

void func_0e36() {

   say( "Nay, these poisonings make no sense. Not knowing how long we may be trapped here, I have been extremely careful about preserving our food supply." );
   func_0e50();
} // end func

void func_0e43() {

   say( "Do not tell me how to do my job, @GS8! I have taken the utmost care in maintaining our stock of food. I tell thee, the food was fresh when I brought it from the store-room." );
   func_0e50();
} // end func

void func_0e50() {

   int locals[22];

   say( "Canst thou keep a secret, Avatar?" );
   locals[1] = 86;
   locals[2] = 87;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0e98();
   break;

   case 2:

      func_0ea5();
   break;

   } // end switch

} // end func

void func_0e98() {

   say( "Well, @GS8, I think that Feridwyn may be the man behind the food poisonings, and perhaps more. I have no solid evidence... yet... but he makes me very nervous! Keep thine eyes on him." );
   func_0165();
} // end func

void func_0ea5() {

   say( "Never mind, then." );
} // end func

void func_0eb0() {

   int locals[22];

   say( "We shall all mourn the loss of Lady Tory. She was a kindly woman, who often took time to talk with the servants." );
   locals[1] = 91;
   locals[2] = 92;
   locals[3] = 93;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0f0c();
   break;

   case 2:

      func_0f54();
   break;

   case 3:

      func_0f61();
   break;

   } // end switch

} // end func

void func_0f0c() {

   int locals[22];

   say( "Most of the nobles here do not generally converse with the castle staff. 'Tis not out of malice, methinks, but simply because it doth not occur to them that we are capable of intelligent conversation! Lady Tory treated us the same as she did the Lords and Ladies, even Lord British." );
   locals[1] = 95;
   locals[2] = 96;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0f6e();
   break;

   case 2:

      func_0f61();
   break;

   } // end switch

} // end func

void func_0f54() {

   say( "Aye, and from what I hear, 'twas a gruesome stabbing! Apparently the killer was an incompetent, and had to stab her many times before she died. It chills my blood to think upon the deed. Be careful, Avatar. The murderer is still at large." );
   func_0165();
} // end func

void func_0f61() {

   say( "Feridwyn is at the top of my list of suspects, Avatar. He is distant and arrogant, and often rude to me. I'd not have guessed he was the murdering type, but 'twould not surprise me greatly. I am not so certain that he has abandoned all ties with the treacherous Fellowship." );
   func_0165();
} // end func

void func_0f6e() {

   say( "Not that I have noticed, I'm afraid. But we continue to look forward to the day when we are treated as equals in the castle." );
   func_0165();
} // end func

void func_0f7b() {

   int locals[22];

   say( "To think, 'twas Patterson all along. I should have known he was the traitor." );
   locals[1] = 101;
   locals[2] = 102;
   locals[3] = 103;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0fd7();
   break;

   case 2:

      func_0fe4();
   break;

   case 3:

      func_0ff1();
   break;

   } // end switch

} // end func

void func_0fd7() {

   say( "'Tis no excuse, if thou doth ask me! The Guardian has been harassing all of us, but only Patterson succumbed.  He was a cowardly dolt, and much evil has come from his cowardice." );
   func_0165();
} // end func

void func_0fe4() {

   say( "Thou dost not need to rub it in, Avatar. I made an error in judgement, I confess.  But I still do not trust Feridwyn! We have no assurances that he was not also involved." );
   func_0165();
} // end func

void func_0ff1() {

   say( "No, I did not  Nelson always seemed to me an unfriendly man, who had time only for his studies. He never paid much attention to the servants. Don't misunderstand me -- I am shocked and dismayed by his death -- but we were not friends." );
   func_0165();
} // end func

void func_0ffe() {

   int locals[56];

   if ( private[75] ) {

      if ( private[76] ) {

         say( "Look, Avatar, this may be important." );
      } else {

         private[75] = 0;
         say( "Avatar, look what I have found!" );
         locals[2] = 109;
         locals[3] = 110;
         locals[4] = 0;
         locals[23] = babl_menu( 0, &locals[2] );
         switch ( locals[23] ) {

         case 1:

            goto label_1064;

         break;

         case 2:

         break;

         } // end switch

         say( "Have it thine own way, Avatar!" );
         private[75] = 1;
         private[76] = 1;
         func_0156();
      } // end if

      label_1064:;

      private[76] = 0;
      say( "'Tis a key! 'Twas in a locked chest in an old storeroom. It looks very old, perhaps from the days of Minax!" );
      locals[24] = 113;
      locals[25] = 114;
      locals[26] = 0;
      locals[45] = babl_menu( 0, &locals[24] );
      switch ( locals[45] ) {

      case 1:

         goto label_10a9;

      break;

      case 2:

         goto label_10ae;

      break;

      } // end switch

      label_10a9:;

      say( "I hope it helps thee!" );
      goto label_10bf;

      label_10ae:;

      locals[46] = 116;
      print( 1, &locals[46] );
      say( "Well, you might as well take it anyway." );
      label_10bf:;

      locals[1] = do_inv_create( 1, &locals[47] );
      locals[47] = 269;
      locals[48] = 1;
      locals[49] = 65535;
      locals[50] = 2;
      locals[51] = 65535;
      locals[52] = 65535;
      locals[53] = 65535;
      locals[54] = 65535;
      locals[55] = 65535;
      x_obj_stuff( 9, &locals[55], &locals[54], &locals[53], &locals[52], &locals[51], &locals[50], &locals[49], &locals[48], &locals[1] );
      locals[56] = 269;
      take_from_npc( 1, &locals[56] );
   } else {

      say( "'Tis not so important, but did I mention what I found with the key? Some old document about a battle with a sorcerer, whose body was never found. It all crumbled when I tried to pick it up!" );
   } // end if

} // end func

void func_1137() {

   say( "It hath been a quiet year here at the castle.  Bennie and Boots have retired from the staff, so more of the duties now fall to me. My sister Nell has married that... artist, Caroccio.  I'm not entirely sure I approve, but she is happy with him." );
} // end func

conversation #133
string block 0x0e84, name Geoffrey

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05c5();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[75];

   if ( private[0] == 0 ) {

      private[74] = 0;
      private[75] = 0;
      func_078c();
   } // end if

   locals[5] = 109;
   if ( get_quest( 1, &locals[5] ) ) {

   } else {

      say( "I will speak with thee in a moment, Avatar. First, though, let us hear what Lord British counsels." );
      func_0165();
   } // end if

   locals[6] = 110;
   if ( get_quest( 1, &locals[6] ) ) {

      say( "Quickly, Avatar, let us begin! Our guards cannot hold them for long!" );
      func_0156();
   } // end if

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_035a();
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[7] = locals[4];
   0 == locals[7];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[7] ) {

      locals[8] = 1;
      func_0816( &locals[8], 69 );
      locals[2] = 1;
   } else {

      if ( private[0] == 0 && locals[2] == 0 ) {

         say( "Ah, Avatar! 'Tis good to have thee here in this crisis. But I must speak with thee at once, in private!" );
      } else {

         if ( locals[1] ) {

            say( "Good day, Avatar! What's on thy mind?" );
         } else {

            say( "Yes, my friend?" );
         } // end if

      } // end if

   } // end if

   label_068c:;

   locals[30] = locals[2];
   locals[9] = 11;
   locals[31] = locals[1];
   locals[10] = 12;
   locals[32] = 1;
   locals[11] = 13;
   locals[33] = private[36];
   locals[12] = 14;
   locals[34] = 1;
   locals[13] = 15;
   locals[14] = 0;
   locals[51] = babl_fmenu( 0, &locals[9], &locals[30] );
   switch ( locals[51] ) {

   case 11:

      locals[52] = 0;
      func_0816( &locals[52], 69 );
   break;

   case 12:

      locals[53] = 0;
      func_0816( &locals[53], 69 );
   break;

   case 13:

      func_080b();
   break;

   case 14:

      func_08ff();
   break;

   case 15:

      func_0165();
   break;

   } // end switch

   say( "What else have we to speak of?" );
   locals[54] = 17;
   locals[55] = 18;
   locals[56] = 0;
   locals[75] = babl_menu( 0, &locals[54] );
   switch ( locals[75] ) {

   case 1:

   break;

   case 2:

      goto label_068c;

   break;

   } // end switch

} // end func

void func_078c() {

   private[2][1] = 0;
   private[2][2] = 8;
   private[18][1] = 69;
   private[18][2] = 2;
   private[18][3] = 4;
   private[18][4] = 5;
   private[18][5] = 7;
   private[18][6] = 9;
   private[18][7] = 10;
   private[18][8] = 11;
   private[18][9] = 12;
   private[18][10] = 13;
   private[18][11] = 14;
   private[34] = 2;
   private[35] = 11;
   private[36] = 1;
} // end func

void func_080b() {

   say( "After we thwarted the Guardian last time, I resumed my survey of Britannia's taverns. I was at the Friendly Knave in Moonglow, trying out a new ale they have there, when I received the invitation to Lord British's festival. Of course I sailed for the castle at once -- my survey is hard work, and I thought this would be a fine vacation. @GS8, the Guardian shall owe me for every hour of revelry I am missing!" );
} // end func

void func_0816() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      func_0a5a();
   } else {

      if ( 2 == locals[1] ) {

         func_10b8();
      } else {

         if ( 4 == locals[1] ) {

            func_0f0f();
         } else {

            if ( 5 == locals[1] ) {

               func_0da3();
            } else {

               if ( 7 == locals[1] ) {

                  func_0c80();
               } else {

                  if ( 8 == locals[1] ) {

                     func_0dfe();
                  } else {

                     if ( 9 == locals[1] ) {

                        func_0c80();
                     } else {

                        if ( 10 == locals[1] ) {

                           func_0c80();
                        } else {

                           if ( 11 == locals[1] ) {

                              func_0fe7();
                           } else {

                              if ( 12 == locals[1] ) {

                                 func_116f();
                              } else {

                                 if ( 13 == locals[1] ) {

                                    func_0e8c();
                                 } else {

                                    if ( 14 == locals[1] ) {

                                       func_1056();
                                    } else {

                                       if ( 69 == locals[1] ) {

                                          func_0f85();
                                       } // end if

                                    } // end if

                                 } // end if

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_08ff() {

   int locals[52];

   say( "Of course! I could do with the practice, myself! I've been working on the mace and axe, these days." );
   label_0907:;

   locals[1] = 21;
   locals[2] = 22;
   locals[3] = 23;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0958;

   break;

   case 2:

      goto label_0997;

   break;

   case 3:

      return;

   break;

   } // end switch

   label_0958:;

   locals[23] = 4;
   locals[24] = 10001;
   if ( x_skills( 2, &locals[24], &locals[23] ) ) {

      locals[25] = 24;
      print( 1, &locals[25] );
   } else {

      locals[26] = 25;
      print( 1, &locals[26] );
      say( "Perhaps thou art having an off day, Avatar." );
      return;

      label_0997:;

      locals[27] = 5;
      locals[28] = 10001;
      if ( x_skills( 2, &locals[28], &locals[27] ) ) {

         locals[29] = 27;
         print( 1, &locals[29] );
      } else {

         locals[30] = 28;
         print( 1, &locals[30] );
         say( "I seem to have the advantage of thee, today, @GS8." );
      } // end if

   } // end if

   say( "Shall we go another round?" );
   locals[31] = 31;
   locals[32] = 32;
   locals[33] = 0;
   locals[52] = babl_menu( 0, &locals[31] );
   switch ( locals[52] ) {

   case 1:

      goto label_0907;

   break;

   case 2:

   break;

   } // end switch

} // end func

void func_0a17() {

   int locals[4];

   locals[1] = 3;
   locals[2] = 10001;
   if ( x_skills( 2, &locals[2], &locals[1] ) ) {

      locals[3] = 33;
      print( 1, &locals[3] );
   } else {

      locals[4] = 34;
      print( 1, &locals[4] );
      say( "I seem to have the advantage of thee, today, @GS8." );
   } // end if

} // end func

void func_0a5a() {

   int locals[114];

   locals[1] = sex( 2, &locals[4], &locals[3] );
   locals[3] = 36;
   locals[4] = 37;
   if ( private[74] ) {

      say( "Do not linger here, Avatar, but hurry to investigate! If we are to escape here at all, it must be done quickly." );
      func_0156();
   } // end if

   private[74] = 1;
   say( "Do not tell the others, @GS8, but I have made a horrible discovery!" );
   locals[5] = 40;
   locals[6] = 41;
   locals[7] = 0;
   locals[26] = babl_menu( 0, &locals[5] );
   switch ( locals[26] ) {

   case 1:

      goto label_0aca;

   break;

   case 2:

   break;

   } // end switch

   say( "Thou dost not know the worst." );
   label_0aca:;

   say( "Iolo and I walked down into the sewers, and a bit below -- a plague of monsters has erupted! I do not know where they are coming from, but the matter bears investigation!" );
   locals[27] = 44;
   locals[28] = 45;
   locals[29] = 0;
   locals[48] = babl_menu( 0, &locals[27] );
   switch ( locals[48] ) {

   case 1:

      goto label_0bc4;

   break;

   case 2:

   break;

   } // end switch

   say( "Avatar, shame on thee! The men and women of the castle are depending on thee!" );
   say( "Take thou this key to the sewers, if thou shouldst recover the courage I admire thee for!" );
   locals[2] = do_inv_create( 1, &locals[49] );
   locals[49] = 269;
   locals[50] = 1;
   locals[51] = 65535;
   locals[52] = 28;
   locals[53] = 65535;
   locals[54] = 65535;
   locals[55] = 65535;
   locals[56] = 65535;
   locals[57] = 65535;
   x_obj_stuff( 9, &locals[57], &locals[56], &locals[55], &locals[54], &locals[53], &locals[52], &locals[51], &locals[50], &locals[2] );
   locals[58] = 269;
   take_from_npc( 1, &locals[58] );
   locals[59] = 48;
   locals[60] = 49;
   locals[61] = 0;
   locals[80] = babl_menu( 0, &locals[59] );
   switch ( locals[80] ) {

   case 1:

      locals[81] = 3;
      func_0136( &locals[81] );
   break;

   case 2:

      func_0156();
   break;

   } // end switch

   label_0bc4:;

   say( "Thou art a brave @SS1, @GS8. I admire thee, though I do not envy thy responsibilities here. Take thou then this key to the sewers!" );
   locals[2] = do_inv_create( 1, &locals[82] );
   locals[82] = 269;
   locals[83] = 1;
   locals[84] = 65535;
   locals[85] = 28;
   locals[86] = 65535;
   locals[87] = 65535;
   locals[88] = 65535;
   locals[89] = 65535;
   locals[90] = 65535;
   x_obj_stuff( 9, &locals[90], &locals[89], &locals[88], &locals[87], &locals[86], &locals[85], &locals[84], &locals[83], &locals[2] );
   locals[91] = 269;
   take_from_npc( 1, &locals[91] );
   locals[92] = 51;
   locals[93] = 52;
   locals[94] = 0;
   locals[113] = babl_menu( 0, &locals[92] );
   switch ( locals[113] ) {

   case 1:

      locals[114] = 3;
      func_0136( &locals[114] );
   break;

   case 2:

      func_0147();
   break;

   } // end switch

} // end func

void func_0c80() {

   int locals[45];

   if ( private[75] == 0 ) {

      private[75] = 1;
      say( "I hear thou hast found a river!  Dost thou realize what this means? We have a water supply! Now perhaps Miranda will ease the rationing of alcohol." );
      locals[1] = 54;
      locals[2] = 55;
      locals[3] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_0d29();
      break;

      case 2:

         func_0d36();
      } // end if

   } else {

   break;

   } // end switch

   say( "I have just now returned from the ice caverns, Avatar. Even after visiting there myself, I can scarcely believe this other world is real!" );
   locals[23] = 57;
   locals[24] = 58;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

   break;

   case 2:

      goto label_0d23;

   break;

   } // end switch

   locals[45] = 59;
   print( 1, &locals[45] );
   say( "Nay, Avatar -- 'twould be folly to doubt THY word." );
   label_0d23:;

   say( "'Tis indeed a shame, that should we destroy this gem, I shall never again have a chance to voyage between the worlds." );
} // end func

void func_0d29() {

   say( "Someone, though, will still need to bring the water back from the ice caves, a dangerous task at best. Methinks I will volunteer!" );
   func_0d51();
} // end func

void func_0d36() {

   int locals[1];

   say( "Aye, @GS8, it hit me where I live!" );
   locals[1] = 64;
   print( 1, &locals[1] );
   func_0d29();
} // end func

void func_0d51() {

   int locals[22];

   locals[1] = 65;
   locals[2] = 66;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0d96();
   break;

   case 2:

      func_0d96();
   break;

   } // end switch

} // end func

void func_0d96() {

   say( "Good luck to the both of us then, @GS8." );
   func_0165();
} // end func

void func_0da3() {

   int locals[22];

   say( "By the Serpent, Avatar! Standing around in this castle is driving me crazy!" );
   locals[1] = 69;
   locals[2] = 70;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0deb;

   break;

   } // end switch

   say( "I have done so, perhaps a dozen times already! I am no good at organizing supplies, or calming the mayor. If only she'd give me permission to venture through the gem, as thou dost . . ." );
   return;

   label_0deb:;

   say( "Aye, thou'rt right -- 'tis fruitless, and I only upset the others. Oh, for a comfortable pub, and a drink!" );
   func_0156();
} // end func

void func_0df3() {

   say( "Now that thou hast found a source of water, we are spared at least one grim fate!" );
} // end func

void func_0dfe() {

   int locals[22];

   say( "Avatar, there has been foul murder here in the castle! 'Tis outrageous! 'Tis calamitous! 'Tis..." );
   locals[1] = 75;
   locals[2] = 76;
   locals[3] = 77;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0e5a();
   break;

   case 2:

      func_0e67();
   break;

   case 3:

      func_0e74();
   break;

   } // end switch

} // end func

void func_0e5a() {

   say( "Whoever the agent, I hold the Guardian responsible! Some day soon there must be reckoning with that red miscreant." );
   func_0165();
} // end func

void func_0e67() {

   say( "'Twas the Lady Tory -- she was stabbed in her quarters!" );
   func_0e5a();
} // end func

void func_0e74() {

   say( "Nay, the villain was most careful. 'Twas the Lady Tory who was killed -- I'll wager there's a spy in our midst who feared that Tory's empathy would ferret them out. Such a monstrous deed!" );
   func_0165();
} // end func

void func_0e81() {

   say( "Lady Tory's murder will not go unavenged. You have my word on that, @GS8!" );
} // end func

void func_0e8c() {

   int locals[22];

   say( "Two murders now, and a third dead as well. 'Tis a sad thing that such griefs should be visited upon the castle." );
   locals[1] = 83;
   locals[2] = 84;
   locals[3] = 85;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0ee8();
   break;

   case 2:

      func_0ef5();
   break;

   case 3:

      func_0f02();
   break;

   } // end switch

} // end func

void func_0ee8() {

   say( "Who can say, of such things? I thought him merely a coward. And the result is, our debt of vengeance to the Guardian has grown again." );
   func_0165();
} // end func

void func_0ef5() {

   say( "Nay, I hardly knew him at all. He seemed to me a likable fellow, but shy.  He spent most of his hours in the library. Always there was a book in his hand, and never a drink." );
   func_0165();
} // end func

void func_0f02() {

   say( "One would hope not. But if the Guardian had one pawn in our midst, can we be certain that there are no more?" );
   func_0165();
} // end func

void func_0f0f() {

   int locals[22];

   say( "That bloke Patterson, he certainly is a strange one." );
   locals[1] = 90;
   locals[2] = 91;
   locals[3] = 92;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0f6b();
   break;

   case 2:

      func_0f6b();
   break;

   case 3:

      func_0f78();
   break;

   } // end switch

} // end func

void func_0f6b() {

   say( "I offered to share with him the last of my whiskey, just to cheer him up, and he refused! Canst thou imagine?" );
   func_0165();
} // end func

void func_0f78() {

   say( "Suspicious? No, I'd not say that. Anxious is more like it. Patterson is a coward, and being trapped in here by the Guardian is just fuelling his cowardice." );
   func_0165();
} // end func

void func_0f85() {

   int locals[22];

   say( "My task of bringing water from the ice-caves is going extremely well." );
   locals[1] = 96;
   locals[2] = 97;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_103c();
   break;

   case 2:

      func_0fda();
   break;

   } // end switch

} // end func

void func_0fcd() {

   say( "They were an annoyance at first, but I have since taught them that 'tis safer to let me be! I have saved some of the pelts, if thou dost wish to see them later." );
   func_0fda();
} // end func

void func_0fda() {

   say( "I am jealous of thee, @GS8! Thou dost get to explore new dimensions whilst I lug buckets of water back and forth. 'Tis mundane labor for a knight, but necessary. I am happy to do it." );
   func_0165();
} // end func

void func_0fe7() {

   int locals[22];

   say( "I left some lifting equipment hidden in the ice-caves, and now all of it is missing! As if carrying all of that water isn't toil enough..." );
   locals[1] = 101;
   locals[2] = 102;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_102f();
   break;

   case 2:

      func_103c();
   break;

   } // end switch

} // end func

void func_102f() {

   say( "Nay, I've no idea who the robber is..." );
   func_1049();
} // end func

void func_103c() {

   say( "There are no signs that Yeti were anywhere near the place where I kept the equipment..." );
   func_1049();
} // end func

void func_1049() {

   say( "I fear that the mysterious castle thief has been venturing into the other planes." );
   func_0165();
} // end func

void func_1056() {

   int locals[22];

   say( "Look at thee... @GS8, the human bottle! After we have settled with the Guardian, we should fill thee with ale and keep thee locked in the pantry!" );
   locals[1] = 107;
   locals[2] = 108;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_109e();
   break;

   case 2:

      func_10ab();
   break;

   } // end switch

} // end func

void func_109e() {

   say( "Take care that the mud stays caked to thee. Should it start to flake, Nell with have thy hide for making a mess of her castle!" );
   func_0165();
} // end func

void func_10ab() {

   say( "Ah, Avatar, 'tis the times of trouble when one's sense of humor is most valuable." );
   func_0165();
} // end func

void func_10b8() {

   int locals[22];

   say( "The Guardian has been harassing me in my sleep. 'Tis most annoying." );
   locals[1] = 112;
   locals[2] = 113;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_1100();
   break;

   case 2:

      func_1162();
   break;

   } // end switch

} // end func

void func_1100() {

   int locals[22];

   say( "He hath made a variety of threats on my person, which of course are empty. Once he offered me a brewery of mine own, were I to betray thee and Lord British. Canst thou imagine? Only one brewery!" );
   locals[1] = 115;
   locals[2] = 116;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_1148();
   break;

   case 2:

      func_1155();
   break;

   } // end switch

} // end func

void func_1148() {

   say( "'Twas only a jest, Avatar. Of course not!" );
   func_0165();
} // end func

void func_1155() {

   say( "Ah, there I think thou hast found the Guardian's weakness. He is only served through fear, so his servants are those who lack true courage. Such a ruler can never hope for victory." );
   func_0165();
} // end func

void func_1162() {

   say( "I will not. He offers me threats and bribes, but behind both I sense his deception. If thou dost ask me, he still smarts from our part in his previous defeat." );
   func_0165();
} // end func

void func_116f() {

   int locals[22];

   say( "The sewers grow more and more dangerous with each trip I make. I have just now met with a pair of dread spiders -- and to think I thought them a myth!" );
   locals[1] = 121;
   locals[2] = 122;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_11b4;

   break;

   case 2:

      goto label_11b9;

   break;

   } // end switch

   label_11b4:;

   say( "Aye, worry not! The dreads left our encounter shy a few legs, though!" );
   return;

   label_11b9:;

   say( "Nay, nay, @GS8! I shall bear my own weight, as thou must bear thine!" );
} // end func

conversation #134
string block 0x0e85, name Iolo

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05c5();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[75];

   if ( private[0] == 0 ) {

      func_078c();
      private[37] = 0;
   } // end if

   locals[5] = 109;
   if ( get_quest( 1, &locals[5] ) ) {

   } else {

      say( "Abide a moment, Avatar. Let us both first hear the words of a wiser man than we." );
      func_0165();
   } // end if

   locals[6] = 110;
   if ( get_quest( 1, &locals[6] ) ) {

      say( "Avatar, we are being forced back into the throne room! Please, if thou hast some magic to try, now is the time!" );
      func_0156();
   } // end if

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_035a();
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[7] = locals[4];
   0 == locals[7];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[7] ) {

      locals[8] = 1;
      func_07f6( &locals[8], 69 );
      locals[2] = 1;
   } else {

      if ( private[0] == 0 && locals[2] == 0 ) {

         say( "Ah, @GS8, 'tis good thou art here -- perhaps we shall fight back to back again, as in the time when thou sought to become the Avatar." );
      } else {

         if ( locals[1] ) {

            say( "Avatar! I was just thinking of thee." );
         } else {

            say( "Ah, @GS8, kind of thee to drop in on me." );
         } // end if

      } // end if

   } // end if

   label_0687:;

   locals[30] = locals[2];
   locals[9] = 11;
   locals[31] = locals[1];
   locals[10] = 12;
   locals[32] = 1;
   locals[11] = 13;
   locals[33] = private[36];
   locals[12] = 14;
   locals[34] = 1;
   locals[13] = 15;
   locals[14] = 0;
   locals[51] = babl_fmenu( 0, &locals[9], &locals[30] );
   switch ( locals[51] ) {

   case 11:

      locals[52] = 0;
      func_07f6( &locals[52], 69 );
   break;

   case 12:

      locals[53] = 0;
      func_07f6( &locals[53], 69 );
   break;

   case 13:

      func_07eb();
   break;

   case 14:

      func_0cf1();
   break;

   case 15:

      func_0165();
   break;

   } // end switch

   say( "May I help thee with anything else?" );
   locals[54] = 17;
   locals[55] = 18;
   locals[56] = 0;
   locals[75] = babl_menu( 0, &locals[54] );
   switch ( locals[75] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "What is it, then?" );
      goto label_0687;

   break;

   } // end switch

} // end func

void func_078c() {

   private[18][1] = 0;
   private[18][2] = 2;
   private[18][3] = 3;
   private[18][4] = 5;
   private[18][5] = 7;
   private[18][6] = 8;
   private[18][7] = 13;
   private[18][8] = 64 + 5;
   private[34] = 0;
   private[35] = 8;
   private[36] = 1;
   private[71] = 20;
} // end func

void func_07eb() {

   say( "I have lived here at the castle, serving Lord British as Captain of the Guard.  This past year has been a quiet one, so I have had very few vital tasks to perform. I confess that, in my spare time, I have become something of a philosopher. Exercising the mind, I have found, is every bit as tiring as exercising the body!" );
} // end func

void func_07f6() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      func_08a3();
   } else {

      if ( 2 == locals[1] ) {

         func_08ae();
      } else {

         if ( 3 == locals[1] ) {

            func_0924();
         } else {

            if ( 5 == locals[1] ) {

               func_0a1a();
            } else {

               if ( 7 == locals[1] ) {

                  func_0acd();
               } else {

                  if ( 8 == locals[1] ) {

                     func_0b22();
                  } else {

                     if ( 13 == locals[1] ) {

                        func_0bb0();
                     } else {

                        if ( 69 == locals[1] ) {

                           func_0c26();
                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_08a3() {

   say( "In a way, 'tis a relief to be in action again. To confront danger in the realm's defense, 'tis a strange sort of exhilaration, and I have not felt it for a long time." );
} // end func

void func_08ae() {

   int locals[22];

   say( "I have heard that thou hast ventured into another world! Your discovery makes this blackrock prison seems less menacing." );
   locals[1] = 24;
   locals[2] = 25;
   locals[3] = 26;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_090a();
   break;

   case 2:

      func_090a();
   break;

   case 3:

      func_0917();
   break;

   } // end switch

} // end func

void func_090a() {

   say( "Few things have a more profoundly negative effect on the spirit than hopeless confinement. Your discovery of this gem makes our plight seem not so hopeless." );
   func_0165();
} // end func

void func_0917() {

   say( "Ah, but now we know our imprisonment is not complete." );
   func_090a();
} // end func

void func_0924() {

   int locals[22];

   say( "A dagger is missing from the armoury, @GS8. Didst thou borrow it?" );
   locals[1] = 30;
   locals[2] = 31;
   locals[3] = 32;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0980();
   break;

   case 2:

      func_098d();
   break;

   case 3:

      func_099a();
   break;

   } // end switch

} // end func

void func_0980() {

   say( "Well, someone has taken it. I have asked nearly everyone, and no one knows anything about it. 'Tis most strange." );
   func_09a7();
} // end func

void func_098d() {

   say( "'Twould appear so. I had left it out on a bench to be sharpened -- 'twas a dull blade -- and returned with a whetstone to find it missing. I find the thought of a thief running about the castle to be most disturbing." );
   func_09a7();
} // end func

void func_099a() {

   say( "I know, Avatar. But I have asked everyone in the castle, and none can account for it." );
   func_09a7();
} // end func

void func_09a7() {

   int locals[22];

   locals[1] = 36;
   locals[2] = 37;
   locals[3] = 38;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a00();
   break;

   case 2:

      func_0a00();
   break;

   case 3:

      func_0a0d();
   break;

   } // end switch

} // end func

void func_0a00() {

   say( "I shall do so, @GS8." );
   func_0165();
} // end func

void func_0a0d() {

   say( "I appreciate thine aid, @GS8." );
   func_0165();
} // end func

void func_0a1a() {

   int locals[22];

   say( "That Syria is certainly, well . . . she is a most extraordinary woman." );
   locals[1] = 42;
   locals[2] = 43;
   locals[3] = 44;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a76();
   break;

   case 2:

      func_0a76();
   break;

   case 3:

      func_0ac2();
   break;

   } // end switch

} // end func

void func_0a76() {

   int locals[22];

   say( "She came to me seeking a training partner, but I am afraid I could be of little use to her." );
   locals[1] = 46;
   locals[2] = 47;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0abc;

   break;

   case 2:

   break;

   } // end switch

   say( "Nay, thou'rt right, but 'twas not the reason!" );
   label_0abc:;

   say( "There was simply nothing I could teach her! My fighting methods are fine for beating down a goblin's club, or hewing through some brigand's ring mail, but they cannot compare with her! In seconds, she had taken the blade from my hand, and dropped me flat on my back!" );
} // end func

void func_0ac2() {

   say( "Next to her, I looked to be a rank beginner! I am handy with a sword, compared to any goblin or brigand in the land, but Syria . . . she is a master of the blade." );
} // end func

void func_0acd() {

   int locals[22];

   say( "With the water thou hast found, we could withstand a siege for quite some time." );
   locals[1] = 52;
   locals[2] = 53;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b15();
   break;

   case 2:

      func_0b15();
   break;

   } // end switch

} // end func

void func_0b15() {

   say( "Clearly the Guardian has trapped us here to keep our leadership from the rest of Britannia. If the war outside goes badly, we should expect the Guardian's armies to lay siege to this castle. The few of us here would not survive. We must find a way out of here before then!" );
   func_0165();
} // end func

void func_0b22() {

   int locals[22];

   say( "I have heard the news about Lady Tory. We must all be doubly wary, Avatar, now that we know there is an enemy among us." );
   locals[1] = 56;
   locals[2] = 57;
   locals[3] = 58;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b7e();
   break;

   case 2:

      func_0b8b();
   break;

   case 3:

      func_0b98();
   break;

   } // end switch

} // end func

void func_0b7e() {

   say( "I didst not say that, @GS8.  We must exercise caution, but avoid falling prey to paranoia. 'Tis my philosophy that if we lose our heads, the rest of us will surely follow." );
   func_0165();
} // end func

void func_0b8b() {

   say( "Nay, I do not. With no evidence, 'twould be dangerous and foolhardy to make accusations." );
   func_0165();
} // end func

void func_0b98() {

   say( "I think that the murder was done by whoever stole the blunted dagger from the armoury earlier. I have heard that the wounds on Lady Tory were inflicted with a dull-edged blade." );
   func_0165();
} // end func

void func_0ba5() {

   say( "The murder was committed with a dagger stolen fron the armoury. Thou wouldst be wise to guard thine own possessions!" );
} // end func

void func_0bb0() {

   int locals[22];

   say( "Thine efforts in collecting these gems are having a definite effect, @GS8." );
   locals[1] = 64;
   locals[2] = 65;
   locals[3] = 66;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0c19();
   break;

   case 2:

      func_0c19();
   break;

   case 3:

      func_0c0c();
   break;

   } // end switch

} // end func

void func_0c0c() {

   say( "Surely it is!" );
   func_0c19();
} // end func

void func_0c19() {

   say( "We can hear the great gem weaken, creaking like the timbers of a ship in a storm." );
   func_0165();
} // end func

void func_0c26() {

   int locals[22];

   say( "I have heard that thou hast passed an examination on an alien world. Is this true?" );
   locals[1] = 70;
   locals[2] = 71;
   locals[3] = 72;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0c82();
   break;

   case 2:

      func_0c82();
   break;

   case 3:

      func_0ce4();
   break;

   } // end switch

} // end func

void func_0c82() {

   int locals[22];

   say( "Methinks that there is a parallel here... in my philosophy, smaller events are often symbols of larger ones. Perhaps, as thou hast passed this test, so thou art passing a greater test of courage whereby thou wilt defeat the Guardian!" );
   locals[1] = 74;
   locals[2] = 75;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0cca();
   break;

   case 2:

      func_0cd7();
   break;

   } // end switch

} // end func

void func_0cca() {

   say( "I thank thee, Avatar. My thoughts are always at thy disposal." );
   func_0165();
} // end func

void func_0cd7() {

   say( "Perhaps 'tis true. I do have a tendency to apply my philosophies to everything." );
   func_0165();
} // end func

void func_0ce4() {

   say( "Oh. I guess the rumor was false." );
   func_0165();
} // end func

void func_0cf1() {

   int locals[52];

   say( "'Tis always an honor to train the Avatar, @GS8. What wouldst thou care to learn?" );
   goto label_0cfe;

   label_0cfb:;

   say( "Excellent! What shall we work on now?" );
   label_0cfe:;

   locals[1] = 81;
   locals[2] = 82;
   locals[3] = 83;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0d4f;

   break;

   case 2:

      goto label_0d91;

   break;

   case 3:

      return;

   break;

   } // end switch

   label_0d4f:;

   say( "Pay close attention, Avatar." );
   locals[23] = 0;
   locals[24] = 10001;
   if ( x_skills( 2, &locals[24], &locals[23] ) ) {

      locals[25] = 85;
      print( 1, &locals[25] );
   } else {

      locals[26] = 86;
      print( 1, &locals[26] );
      say( "Thou dost need to practice what thou hast already learned, Avatar." );
      return;

      label_0d91:;

      say( "Come, let us spar." );
      locals[27] = 1;
      locals[28] = 10001;
      if ( x_skills( 2, &locals[28], &locals[27] ) ) {

         locals[29] = 89;
         print( 1, &locals[29] );
      } else {

         locals[30] = 90;
         print( 1, &locals[30] );
         say( "Thou dost need to practice what thou hast already learned, Avatar." );
      } // end if

   } // end if

   say( "Shall we go another round?" );
   locals[31] = 93;
   locals[32] = 94;
   locals[33] = 0;
   locals[52] = babl_menu( 0, &locals[31] );
   switch ( locals[52] ) {

   case 1:

      goto label_0cfb;

   break;

   case 2:

   break;

   } // end switch

} // end func

conversation #135
string block 0x0e86, name Julia

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05c5();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[75];

   private[73] = 0;
   if ( private[0] == 0 ) {

      func_0785();
   } // end if

   locals[5] = 109;
   if ( get_quest( 1, &locals[5] ) ) {

   } else {

      say( "Just a moment, Avatar. 'Twere best we let Lord British speak first." );
      func_0165();
   } // end if

   locals[6] = 110;
   if ( get_quest( 1, &locals[6] ) ) {

      say( "Now is the time, @GS8!" );
      func_0156();
   } // end if

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_035a();
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[7] = locals[4];
   0 == locals[7];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[7] ) {

      locals[8] = 1;
      func_0845( &locals[8], 69 );
      locals[2] = 1;
   } else {

      if ( private[0] == 0 ) {

         say( "I am glad to see my old companion again, now that we are in this fix." );
      } else {

         if ( locals[1] ) {

            say( "'Tis good to speak with thee again." );
         } else {

            say( "Yes, my friend?" );
         } // end if

      } // end if

   } // end if

   label_0680:;

   locals[30] = locals[2];
   locals[9] = 11;
   locals[31] = locals[1];
   locals[10] = 12;
   locals[32] = 1;
   locals[11] = 13;
   locals[33] = private[36];
   locals[12] = 14;
   locals[34] = 1;
   locals[13] = 15;
   locals[14] = 0;
   locals[51] = babl_fmenu( 0, &locals[9], &locals[30] );
   switch ( locals[51] ) {

   case 11:

      locals[52] = 0;
      func_0845( &locals[52], 69 );
   break;

   case 12:

      locals[53] = 0;
      func_0845( &locals[53], 69 );
   break;

   case 13:

      func_07e9();
   break;

   case 14:

      func_08fe();
   break;

   case 15:

      func_0165();
   break;

   } // end switch

   say( "Now, is there aught else thou wouldst speak to me about?" );
   locals[54] = 17;
   locals[55] = 18;
   locals[56] = 0;
   locals[75] = babl_menu( 0, &locals[54] );
   switch ( locals[75] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "Of course. What hast thou in mind?" );
      goto label_0680;

   break;

   } // end switch

} // end func

void func_0785() {

   private[18][1] = 0;
   private[18][2] = 1;
   private[18][3] = 3;
   private[18][4] = 4;
   private[18][5] = 8;
   private[18][6] = 10;
   private[18][7] = 11;
   private[18][8] = 13;
   private[18][9] = 70;
   private[34] = 0;
   private[35] = 9;
   private[36] = 1;
   private[72] = 0;
} // end func

void func_07e9() {

   int locals[23];

   say( "'Twas most relaxing, @GS8. I spent much of my time at Iolo's South -- business is booming! If I did not miss Gwenno so much, it would have been most enjoyable." );
   locals[1] = 21;
   locals[2] = 22;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0831;

   break;

   } // end switch

   say( "None at all, I'm afraid, since she left on her voyage of exploration. Why did she not ask me to go along? 'Tis most disheartening." );
   return;

   label_0831:;

   locals[23] = 24;
   print( 1, &locals[23] );
   say( "My friend, I find such things are little consolation." );
} // end func

void func_0845() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      func_0a63();
   } else {

      if ( 1 == locals[1] ) {

         func_0b1d();
      } else {

         if ( 3 == locals[1] ) {

            func_0b64();
         } else {

            if ( 4 == locals[1] ) {

               func_0d47();
            } else {

               if ( 8 == locals[1] ) {

                  func_0d8e();
               } else {

                  if ( 10 == locals[1] ) {

                     func_0e1a();
                  } else {

                     if ( 11 == locals[1] ) {

                        func_0c7a();
                     } else {

                        if ( 13 == locals[1] ) {

                           func_0c13();
                        } else {

                           if ( 70 == locals[1] ) {

                              func_0bad();
                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_08fe() {

   int locals[56];

   say( "Of course! 'Tis always a pleasure to work with thee, my friend. I can teach thee missile weapons. I have also noticed that I am a much better swimmer than thee. Or perhaps thou wouldst like some skill in appraising craftsmanship?" );
   label_0906:;

   locals[1] = 27;
   locals[2] = 28;
   locals[3] = 29;
   locals[4] = 30;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_096b;

   break;

   case 2:

      goto label_09aa;

   break;

   case 3:

      goto label_09e6;

   break;

   case 4:

      return;

   break;

   } // end switch

   label_096b:;

   locals[23] = 6;
   locals[24] = 10001;
   if ( x_skills( 2, &locals[24], &locals[23] ) ) {

      locals[25] = 31;
      print( 1, &locals[25] );
   } else {

      locals[26] = 32;
      print( 1, &locals[26] );
      say( "Thy concentration seems a bit off today, @GS8." );
      return;

      label_09aa:;

      locals[27] = 19;
      locals[28] = 10001;
      if ( x_skills( 2, &locals[28], &locals[27] ) ) {

         locals[29] = 34;
         print( 1, &locals[29] );
      } else {

         locals[30] = 35;
         print( 1, &locals[30] );
         return;

         label_09e6:;

         locals[31] = 18;
         locals[32] = 10001;
         if ( x_skills( 2, &locals[32], &locals[31] ) ) {

            locals[33] = 36;
            print( 1, &locals[33] );
         } else {

            locals[34] = 37;
            print( 1, &locals[34] );
         } // end if

      } // end if

   } // end if

   say( "Wouldst thou like to continue, or stop for the moment?" );
   locals[35] = 39;
   locals[36] = 40;
   locals[37] = 0;
   locals[56] = babl_menu( 0, &locals[35] );
   switch ( locals[56] ) {

   case 1:

      goto label_0906;

   break;

   case 2:

   break;

   } // end switch

} // end func

void func_0a63() {

   int locals[47];

   say( "There is little to say, my friend. 'Tis a fine mess we are in this time, is it not?" );
   locals[1] = 42;
   locals[2] = 43;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0ac5;

   break;

   } // end switch

   locals[23] = 44;
   print( 1, &locals[23] );
   say( "Thou shouldst not be so gloomy, @GS8. 'Tis true the situation is grim, but remember! The others look to thee to keep their spirits up." );
   locals[24] = 46;
   print( 1, &locals[24] );
   label_0ac5:;

   say( "'Tis true, my friend! We may be thankful for this prison, inasmuch as we are safe on the inside, while the rest are trapped outside with Chuckles the Jester!" );
   locals[25] = 48;
   print( 1, &locals[25] );
   say( "But really, Avatar, the situation is darker than most here suspect." );
   locals[26] = 50;
   locals[27] = 51;
   locals[28] = 0;
   locals[47] = babl_menu( 0, &locals[26] );
   switch ( locals[47] ) {

   case 1:

      goto label_0b17;

   break;

   case 2:

   break;

   } // end switch

   say( "Courage, Avatar!" );
   label_0b17:;

   say( "Dupre and I took a look down in the sewers when the gem first came up -- 'tis crawling with monstrous vermin! The sewers were never safe, but now they are horrific! I believe he has the key, shouldst thou care to take a look for thyself." );
} // end func

void func_0b1d() {

   int locals[22];

   say( "Hast thou seen the monsters in the sewer yet?" );
   locals[1] = 55;
   locals[2] = 56;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "I'd swear they are getting worse! We can only hope that someone does not discover them and start a panic!" );
} // end func

void func_0b64() {

   int locals[22];

   say( "I hear thou didst journey from the basement to another world. Dost thou think, perhaps, that that world might have its own Virtues, its own Avatar?" );
   locals[1] = 59;
   locals[2] = 60;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      return;

   break;

   case 2:

   break;

   } // end switch

   say( "Hmmm... methinks we ought not lose sight of either in our struggle." );
} // end func

void func_0bad() {

   int locals[22];

   say( "More worlds! Avatar, thou art a very cosmopolitan of the cosmos! If this keeps up, thou shalt soon leave Britannia and thy native Earth behind, in favor of some more felicitous reality!" );
   locals[1] = 63;
   locals[2] = 64;
   locals[3] = 65;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0c0b;

   break;

   case 2:

      goto label_0c06;

   break;

   case 3:

      goto label_0c06;

   break;

   } // end switch

   label_0c06:;

   label_0c06:;

   say( "Thou'rt right, my friend, though there are some fools within the castle who say we might do best to run for it. I shall quiet them with this advice." );
   return;

   label_0c0b:;

   say( "Rightly spoken! This shall silence those in the castle who doubt thee!" );
   return;

} // end func

void func_0c13() {

   int locals[22];

   say( "Avatar, I know not what to say... Nelson was such a gentle man. I am glad, though, that thou wert not gentle in avenging him." );
   locals[1] = 69;
   locals[2] = 70;
   locals[3] = 71;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0c6f;

   break;

   case 3:

      goto label_0c74;

   break;

   } // end switch

   say( "I agree -- there is a time for compassion and humility, but here thou didst rightly choose Honor and Justice." );
   return;

   label_0c6f:;

   say( "So saith Honor and Justice, perhaps. But though Virtue often leads one into battle, an Avatar must never lose sight of Compassion and Humility." );
   return;

   label_0c74:;

   say( "Perhaps thou'rt right, Avatar, but I believe thou didst right in upholding the Virtues of Valor, Honor, and Justice." );
} // end func

void func_0c7a() {

   int locals[66];

   say( "Avatar! I have had the strangest dream!" );
   locals[1] = 76;
   locals[2] = 77;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0cc0;

   break;

   case 2:

   break;

   } // end switch

   say( "No, really..." );
   label_0cc0:;

   say( "The Guardian spoke to me of my wife Gwenno -- he showed me a picture of her in a frozen wasteland -- he said she was in danger, and that he could help her, if I cooperated against you." );
   locals[23] = 80;
   locals[24] = 81;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_0d3c;

   break;

   case 2:

   break;

   } // end switch

   say( "Nay, only what I have told thee." );
   locals[45] = 83;
   locals[46] = 84;
   locals[47] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

   break;

   case 2:

      goto label_0d41;

   break;

   } // end switch

   label_0d3c:;

   say( "@GS8, thou dost insult me! I would never betray thee, not even for Gwenno's sake, for I know she would rather die than see me dishonored!" );
   return;

   label_0d41:;

   say( "We can only hope, Avatar..." );
} // end func

void func_0d47() {

   int locals[22];

   say( "'Twas a narrow escape for Mayor Patterson, this morning!" );
   locals[1] = 88;
   locals[2] = 89;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "I was searching for an underground storeroom, when I heard his cries. He had been set upon by an enormous spider, which for some ungodly reason had crawled up from the depths. What on earth had the fellow been doing down there, I wonder?" );
} // end func

void func_0d8e() {

   int locals[44];

   say( "I cannot believe it -- Tory, struck down in the very midst of the castle! I can't believe one of us would do such a thing." );
   locals[1] = 92;
   locals[2] = 93;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0dd6;

   break;

   } // end switch

   say( "'Tis impossible! How could they walk among us as a friend, after doing such a deed. No, 'twas something crept up from the caverns, I am sure of it!" );
   return;

   label_0dd6:;

   say( "One of these creatures from your other worlds, Avatar! Surely the Guardian has many allies on those planes." );
   locals[23] = 96;
   locals[24] = 97;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      return;

   break;

   case 2:

   break;

   } // end switch

   say( "I shall, but I still cannot believe it's one of our own." );
} // end func

void func_0e1a() {

   int locals[66];

   say( "Thou art rarely in the castle these days, Avatar. Thy affairs in other worlds are keeping thee very busy!" );
   locals[1] = 100;
   locals[2] = 101;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0ea0;

   break;

   } // end switch

   say( "There is little to say. None of us have slept easy since Tory's death, and the monsters are growing worse." );
   locals[23] = 103;
   locals[24] = 104;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_0ea0;

   break;

   case 2:

   break;

   } // end switch

   say( "Godspeed, Avatar!" );
   func_0165();
   label_0ea0:;

   label_0ea0:;

   say( "I will do whatever is in my power, @GS8. Still, between me and thee, Avatar, I worry -- what dangers may lie beyond the holes in that gem? What if the gem opened onto an ocean floor, or a world full of poisonous gases?" );
   locals[45] = 107;
   locals[46] = 108;
   locals[47] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

} // end func

conversation #136
string block 0x0e87, name Miranda

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05c5();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[77];

   if ( private[0] == 0 ) {

      func_07e1();
      private[37] = 0;
   } // end if

   locals[6] = 109;
   if ( get_quest( 1, &locals[6] ) ) {

   } else {

      say( "Shhh! I want to hear what Lord British has to say!" );
      func_0165();
   } // end if

   locals[7] = 43;
   if ( get_quest( 1, &locals[7] ) ) {

      private[55][2] = 7;
   } // end if

   locals[8] = 110;
   if ( get_quest( 1, &locals[8] ) ) {

      say( "Do it, Avatar, come on!" );
      func_0156();
   } // end if

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_035a();
   locals[3] = private[37] > 0;
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[9] = locals[4];
   0 == locals[9];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[9] ) {

      locals[10] = 1;
      func_0868( &locals[10], 69 );
      locals[2] = 1;
   } // end if

   if ( private[0] == 0 && locals[2] == 0 ) {

      say( "I had heard thou wert about, old friend." );
   } else {

      if ( locals[1] ) {

         say( "Avatar, I've been looking all over for thee!" );
      } else {

         say( "What can I do for thee, @GS8?" );
      } // end if

   } // end if

   label_06a7:;

   if ( !locals[2] && !locals[1] ) {

      locals[5] = 1;
   } else {

      locals[5] = 0;
   } // end if

   locals[32] = locals[2];
   locals[11] = 12;
   locals[33] = locals[1];
   locals[12] = 13;
   locals[34] = 1;
   locals[13] = 14;
   locals[35] = private[36];
   locals[14] = 15;
   locals[36] = locals[3];
   locals[15] = 16;
   locals[37] = locals[5];
   locals[16] = 17;
   locals[17] = 0;
   locals[53] = babl_fmenu( 0, &locals[11], &locals[32] );
   switch ( locals[53] ) {

   case 12:

      locals[54] = 0;
      func_0868( &locals[54], 69 );
   break;

   case 13:

      locals[55] = 0;
      func_0868( &locals[55], 69 );
   break;

   case 14:

      func_085d();
   break;

   case 15:

      func_0bcf();
   break;

   case 16:

      func_055e();
   break;

   case 17:

      func_0165();
   break;

   } // end switch

   say( "If there is nothing more, @GS8, I must go now." );
   locals[56] = 19;
   locals[57] = 20;
   locals[58] = 0;
   locals[77] = babl_menu( 0, &locals[56] );
   switch ( locals[77] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "What wouldst thou like to talk about, then?" );
      goto label_06a7;

   break;

   } // end switch

} // end func

void func_07e1() {

   private[55][1] = 22;
   private[55][2] = 23;
   private[2][1] = 1;
   private[2][2] = 8;
   private[18][1] = 0;
   private[18][2] = 2;
   private[18][3] = 4;
   private[18][4] = 7;
   private[18][5] = 10;
   private[18][6] = 13;
   private[18][7] = 64 + 6;
   private[34] = 2;
   private[35] = 7;
   private[36] = 1;
   private[71] = 24;
   private[74] = 1;
} // end func

void func_085d() {

   say( "After travelling across Britannia and back with thee, well, I just couldn't go back to that "rustic village tinker" act I'd been doing the past few years. So since then I've been walking through Northern Britannia, watching the Reconstruction happen." );
} // end func

void func_0868() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( !param1[0]play_hunger ) {

      if ( private[73] ) {

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      } else {

         private[18][0] = private[18][0] + 1024;
      } // end if

   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      func_0a01();
   } else {

      if ( 1 == locals[1] ) {

         if ( param1[0]play_hunger ) {

            say( "Sometimes I wish Patterson weren't quite so eager to help out!" );
         } else {

            func_0955();
         } // end if

      } else {

         if ( 2 == locals[1] ) {

            func_0b58();
         } else {

            if ( 4 == locals[1] ) {

               func_0a8d();
            } else {

               if ( 7 == locals[1] ) {

                  func_0b4d();
               } else {

                  if ( 8 == locals[1] ) {

                     if ( param1[0]play_hunger ) {

                        say( "This will not stand, I swear it!" );
                     } else {

                        func_09a3();
                     } // end if

                  } else {

                     if ( 10 == locals[1] ) {

                        func_0aff();
                     } else {

                        if ( 13 == locals[1] ) {

                           func_0bb9();
                        } else {

                           if ( 70 == locals[1] ) {

                              func_0bc4();
                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_0955() {

   int locals[22];

   say( "I'm trying to teach him to repair weapons, but it's just useless! This morning (if you can call it morning in this godforsaken darkness) he ruined a whole batch of arrows!" );
   locals[1] = 29;
   locals[2] = 30;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_099d;

   break;

   } // end switch

   say( "'Tis a mystery to me that he was elected Mayor of Britain, even with all the Guardian's sorcery on his side!" );
   return;

   label_099d:;

   say( "Perhaps he should go swimming with the lurkers!" );
} // end func

void func_09a3() {

   int locals[23];

   say( "Avatar, if you don't find out who the traitor is, I will! I swear to you, it's that cold bastard Feridwyn. If he gives me one excuse, I'll cut his throat!" );
   locals[1] = 34;
   locals[2] = 35;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_09e8;

   break;

   case 2:

      goto label_09ed;

   break;

   } // end switch

   label_09e8:;

   say( "Yes, see that thou dost!" );
   return;

   label_09ed:;

   locals[23] = 37;
   print( 1, &locals[23] );
   say( "Sometimes, Avatar, thy good nature becomes tiresome!" );
} // end func

void func_0a01() {

   int locals[44];

   say( "Between me and thee, I am glad thou art here, @GS8. We've worked together, fought side by side -- I know I can count on thee!" );
   locals[1] = 40;
   locals[2] = 41;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0a49;

   break;

   } // end switch

   say( "Nay, but there are some here, like Iolo and Dupre, who I can rely upon. People like Feridwyn, Syria, I know not of!" );
   return;

   label_0a49:;

   say( "We must be careful of the others. Feridwyn, for instance, and Syria -- who are they? They happened to come to the festival, but how can we know they are reliable?" );
   locals[23] = 44;
   locals[24] = 45;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      return;

   break;

   case 2:

   break;

   } // end switch

   say( "I know they are our friends, but who can tell what people will do when threatened with death?" );
} // end func

void func_0a8d() {

   int locals[24];

   say( "@GS8, I heard thou hast journeyed to another world! How I wish I could go with thee, but Miranda says 'tis best we remain in the castle for now." );
   locals[1] = 48;
   locals[2] = 49;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0aeb;

   break;

   case 2:

   break;

   } // end switch

   say( "Perhaps I shall! I do long for my old adventuring days, as when we faced the Stygian Abyss together." );
   locals[23] = 51;
   print( 1, &locals[23] );
   say( "'Twas most discourteous of thee to return without me!" );
   private[74] = 1;
   return;

   label_0aeb:;

   locals[24] = 53;
   print( 1, &locals[24] );
   say( "I suppose thou'rt right." );
} // end func

void func_0aff() {

   int locals[22];

   say( "Avatar, thou dost not know what it is like to spend thy nights here. This castle is becoming like some haunted tomb!" );
   locals[1] = 56;
   locals[2] = 57;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0b47;

   break;

   } // end switch

   say( "I will try to share thine optimism, @GS8." );
   return;

   label_0b47:;

   say( "Some nights, lying awake I can hear footsteps walking through the secret passage. Somebody in here can't sleep, and it's no wonder." );
} // end func

void func_0b4d() {

   say( "Thank the Serpent thou didst find the ice caves. Dupre says we'll have all the water we need, soon." );
} // end func

void func_0b58() {

   int locals[23];

   say( "Sorry, @GS8...it's just I'm so distracted." );
   locals[1] = 62;
   locals[2] = 63;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0bb1;

   break;

   } // end switch

   say( "The Guardian won't even leave my thoughts alone! He keeps nagging at me! We're never giving up, do you hear me Guardian? @GS8's getting us out of here!" );
   locals[23] = 65;
   print( 1, &locals[23] );
   say( "Just you wait!" );
   func_0156();
   label_0bb1:;

   say( "That's easy for you to say! You don't have to sit here in the castle, polishing armor, waiting for god-knows-what to come boiling up out of the sewers! At least you get to do something!" );
   func_0156();
} // end func

void func_0bb9() {

   say( "I was just thinking about Patterson. For a while, I actually felt sorry for the man. I mean, he seemed so unhinged, near the end... I don't envy your job, not at all." );
} // end func

void func_0bc4() {

   say( "I think the spell really is weakening -- at night I hear the gem creak and groan, as if it were being strained somehow." );
} // end func

void func_0bcf() {

   int locals[56];

   label_0bd4:;

   say( "To be certain, Avatar! What shall I instruct thee in today?" );
   locals[1] = 71;
   locals[2] = 72;
   locals[3] = 73;
   locals[4] = 74;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0c3c;

   break;

   case 2:

      goto label_0c7b;

   break;

   case 3:

      goto label_0cbd;

   break;

   case 4:

      return;

   break;

   } // end switch

   label_0c3c:;

   locals[23] = 10;
   locals[24] = 10001;
   if ( x_skills( 2, &locals[24], &locals[23] ) ) {

      locals[25] = 75;
      print( 1, &locals[25] );
   } else {

      locals[26] = 76;
      print( 1, &locals[26] );
      say( "Let us try again later, when thou hast worked on a few real traps." );
      return;

      label_0c7b:;

      say( "Art thou not straying a little way from the straight and narrow, Avatar? But no matter, I shall teach thee what I know." );
      locals[27] = 16;
      locals[28] = 10001;
      if ( x_skills( 2, &locals[28], &locals[27] ) ) {

         locals[29] = 79;
         print( 1, &locals[29] );
      } else {

         locals[30] = 80;
         print( 1, &locals[30] );
         say( "Thou shouldst try opening a few real locks, and then let us talk again." );
         return;

         label_0cbd:;

         locals[31] = 14;
         locals[32] = 10001;
         if ( x_skills( 2, &locals[32], &locals[31] ) ) {

            locals[33] = 82;
            print( 1, &locals[33] );
         } else {

            locals[34] = 83;
            print( 1, &locals[34] );
            say( "We will try again later, when thou hast more experience in these matters." );
         } // end if

      } // end if

   } // end if

   say( "Wouldst like to learn more?" );
   locals[35] = 86;
   locals[36] = 87;
   locals[37] = 0;
   locals[56] = babl_menu( 0, &locals[35] );
   switch ( locals[56] ) {

   case 1:

      goto label_0bd4;

   break;

   case 2:

   break;

   } // end switch

} // end func

conversation #137
string block 0x0e88, name Nanna

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_067f();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_067f() {

   int locals[174];

   if ( npc_goal == 10 ) {

      npc_goal = 1;
   } // end if

   locals[5] = 0;
   locals[6] = 0;
   locals[8] = 0;
   locals[7] = 0;
   locals[9] = 0;
   private[78] = get_quest( 1, &locals[12] );
   locals[12] = 128;
   if ( private[0] == 0 ) {

      func_0c2e();
      private[37] = 0;
      private[75] = 0;
      private[76] = 0;
      private[77] = 0;
      private[74] = sex( 2, &locals[14], &locals[13] );
      locals[13] = 6;
      locals[14] = 7;
   } // end if

   locals[15] = 109;
   if ( get_quest( 1, &locals[15] ) ) {

   } else {

      say( "I will speak with thee in a moment, Avatar. Let us both first consult with Lord British." );
      func_0165();
   } // end if

   locals[16] = 110;
   if ( get_quest( 1, &locals[16] ) ) {

      say( "All is in readiness, Avatar. Give the word, and Nystul will begin the incantation." );
      locals[17] = 2;
      func_0136( &locals[17] );
   } // end if

   locals[5] = get_quest( 1, &locals[18] );
   locals[18] = 120;
   locals[6] = get_quest( 1, &locals[19] );
   locals[19] = 107;
   locals[20] = 2;
   locals[21] = 10001;
   if ( x_clock( 2, &locals[21], &locals[20] ) > 7 ) {

      locals[7] = 1;
   } // end if

   locals[8] = get_quest( 1, &locals[22] );
   locals[22] = 14;
   locals[23] = 1;
   locals[24] = 10001;
   if ( x_clock( 2, &locals[24], &locals[23] ) == 14 ) {

      locals[9] = 1;
   } // end if

   if ( locals[5] && locals[6] && locals[7] && locals[8] && locals[9] ) {

      locals[25] = 1;
      locals[26] = 15;
      x_clock( 2, &locals[26], &locals[25] );
   } // end if

   locals[27] = 1;
   locals[28] = 10001;
   if ( x_clock( 2, &locals[28], &locals[27] ) == 3 ) {

      locals[29] = 1;
      locals[30] = 1;
      locals[31] = 10001;
      locals[32] = x_clock( 2, &locals[31], &locals[30] ) + 1;
      x_clock( 2, &locals[32], &locals[29] );
      npc_goal = 1;
   } // end if

   locals[33] = 1;
   locals[34] = 10001;
   if ( x_clock( 2, &locals[34], &locals[33] ) == 11 ) {

      npc_goal = 1;
      locals[35] = 1;
      locals[36] = 1;
      locals[37] = 10001;
      locals[38] = x_clock( 2, &locals[37], &locals[36] ) + 1;
      x_clock( 2, &locals[38], &locals[35] );
   } // end if

   locals[39] = 113;
   if ( get_quest( 1, &locals[39] ) == 1 ) {

      locals[40] = 113;
      locals[41] = 0;
      set_quest( 2, &locals[41], &locals[40] );
      locals[11] = 10;
      locals[42] = 1000 + 2;
      if ( !func_05c5( &locals[42] ) ) {

         locals[11] = 11;
      } // end if

      say( "Avatar, is it true thou didst say that in @SS11 they live peacefully under the Guardian?" );
      locals[43] = 13;
      locals[44] = 14;
      locals[45] = 0;
      locals[64] = babl_menu( 0, &locals[43] );
      switch ( locals[64] ) {

      case 1:

         goto label_08fd;

      break;

      case 2:

         goto label_0902;

      break;

      } // end switch

      label_08fd:;

      say( "Well, I would ask thee not to praise the Guardian so generously, in the future. 'Tis hard enough as it is keep our people from being tempted by the Guardian's offer." );
      goto label_0905;

      label_0902:;

      say( "I don't know where such rumors start, then! I am worried about our morale." );
   } // end if

   label_0905:;

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_035a();
   locals[3] = private[37] > 0;
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[65] = locals[4];
   0 == locals[65];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[65] ) {

      locals[66] = 1;
      func_0cd6( &locals[66], 69 );
      locals[2] = 1;
   } else {

      if ( private[0] == 0 && locals[2] == 0 ) {

         say( "Hello, Avatar." );
      } else {

         if ( locals[1] ) {

            say( "Avatar! Good, I have been expecting thee." );
         } else {

            say( "Good to see thee again, @GS8." );
         } // end if

      } // end if

      locals[67] = 52;
      locals[68] = 10001;
      if ( x_traps( 2, &locals[68], &locals[67] ) ) {

         locals[69] = 20;
         print( 1, &locals[69] );
      } else {

         locals[70] = 21;
         print( 1, &locals[70] );
      } // end if

      locals[71] = 7;
      get_quest( 1, &locals[71] ) && !get_quest( 1, &locals[72] );  // expr. has value on stack!
      if ( locals[72] = 107 ) {

         say( "And what of the horn of Praecor Loth? Dost thou have it?" );
         locals[73] = 23;
         locals[74] = 25;
         locals[75] = 0;
         locals[94] = babl_menu( 0, &locals[73] );
         switch ( locals[94] ) {

         case 1:

            say( "That is good. I'm sure it is very important." );
            locals[95] = 273;
            locals[96] = 1;
            if ( find_inv( 2, &locals[96], &locals[95] ) ) {

               locals[97] = 107;
               locals[98] = 1;
               set_quest( 2, &locals[98], &locals[97] );
            } // end if

         break;

         case 2:

            say( "Perhaps thou shouldst find it.  I'm sure it is very important." );
         } // end if

      } // end if

   break;

   } // end switch

   label_0a5b:;

   locals[120] = locals[2];
   locals[99] = 27;
   locals[121] = locals[1];
   locals[100] = 28;
   locals[122] = 1;
   locals[101] = 29;
   locals[123] = private[78];
   locals[102] = 30;
   locals[124] = 1;
   locals[103] = 31;
   locals[104] = 0;
   locals[141] = babl_fmenu( 0, &locals[99], &locals[120] );
   switch ( locals[141] ) {

   case 27:

      locals[142] = 0;
      func_0cd6( &locals[142], 69 );
   break;

   case 28:

      locals[143] = 0;
      func_0cd6( &locals[143], 69 );
   break;

   case 29:

      func_0ccb();
   break;

   case 30:

      func_11bb();
   break;

   case 31:

      goto label_0bcf;

   break;

   } // end switch

   say( "Is there aught else thou wishest to know?" );
   locals[144] = 33;
   locals[145] = 34;
   locals[146] = 0;
   locals[165] = babl_menu( 0, &locals[144] );
   switch ( locals[165] ) {

   case 1:

   break;

   case 2:

      say( "What wouldst thou like to know?" );
      goto label_0a5b;

   break;

   } // end switch

   locals[166] = 1;
   locals[167] = 10001;
   x_clock( 2, &locals[167], &locals[166] ) > 8 && x_clock( 2, &locals[169], &locals[168] ) < 12;  // expr. has value on stack!
   locals[168] = 1;
   if ( locals[169] = 10001 ) {

      say( "If thou hast not made a point of visiting Charles, please do so. He seemed most pleased about something!" );
      func_0165();
   } // end if

   locals[170] = 1;
   locals[171] = 10001;
   if ( x_clock( 2, &locals[171], &locals[170] ) > 12 ) {

      locals[172] = 120;
      if ( get_quest( 1, &locals[172] ) == 0 ) {

         say( "And do not forget -- Nystul wishes thee to be watchful for something which might tell us more about the casting of this spell on our castle." );
      } // end if

      func_0165();
   } // end if

   label_0bcf:;

   locals[10] = random( 1, &locals[173] );
   locals[173] = 5;
   locals[174] = locals[10];
   if ( 1 == locals[174] ) {

      say( "Farewell, then. Do be careful!" );
   } else {

      if ( 2 == locals[174] ) {

         say( "Be sure and let me know if thou dost learn anything new." );
      } else {

         if ( 3 == locals[174] ) {

            say( "Good luck to thee!" );
         } else {

            if ( 4 == locals[174] ) {

               say( "Do not neglect to keep me informed, Avatar -- the others depend on me for news!" );
            } else {

               if ( 5 == locals[174] ) {

                  say( "Remember to visit me often, @GS8 -- I may have news!" );
               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

   func_0165();
} // end func

void func_0c2e() {

   private[2][1] = 0;
   private[2][2] = 7;
   private[2][3] = 12;
   private[2][4] = 13;
   private[2][5] = 14;
   private[18][1] = 256 + 106;
   private[18][2] = 256 + 107;
   private[18][3] = 1;
   private[18][4] = 2;
   private[18][5] = 4;
   private[18][6] = 5;
   private[18][7] = 8;
   private[18][8] = 9;
   private[18][9] = 15;
   private[18][10] = 64 + 8;
   private[34] = 5;
   private[35] = 10;
   private[36] = 0;
   private[71] = 43;
} // end func

void func_0ccb() {

   say( "Well, Lord British put me in charge of Britannia's environmental problems, starting with Lock Lake, and I've started an organization of women who want a larger role in Britannian society. But who knows if all that will matter now?" );
} // end func

void func_0cd6() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      if ( param1[0]play_hunger ) {

         say( "Avatar! 'Tis good to see thee!" );
      } else {

         func_0de2();
      } // end if

   } else {

      if ( 1 == locals[1] ) {

         func_0e2e();
      } else {

         if ( 2 == locals[1] ) {

            func_0e7f();
         } else {

            if ( 4 == locals[1] ) {

               func_0ecd();
            } else {

               if ( 5 == locals[1] ) {

                  func_0f38();
               } else {

                  if ( 7 == locals[1] ) {

                     func_0f84();
                  } else {

                     if ( 8 == locals[1] ) {

                        func_1086();
                     } else {

                        if ( 9 == locals[1] ) {

                           func_1169();
                        } else {

                           if ( 12 == locals[1] ) {

                              func_1091();
                           } else {

                              if ( 13 == locals[1] ) {

                                 func_1122();
                              } else {

                                 if ( 14 == locals[1] ) {

                                    func_1174();
                                 } else {

                                    if ( 15 == locals[1] ) {

                                       func_113d();
                                    } else {

                                       if ( 72 == locals[1] ) {

                                          func_1148();
                                       } else {

                                          if ( 362 == locals[1] ) {

                                             func_1153();
                                          } else {

                                             if ( 363 == locals[1] ) {

                                                func_115e();
                                             } // end if

                                          } // end if

                                       } // end if

                                    } // end if

                                 } // end if

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_0de2() {

   int locals[22];

   say( "Well, I'm setting up our "War Room" in the Great Hall, where I'll keep track of all the events related to our battle against the Guardian. Make sure to come to me often to get the latest news, and inform me of thy progress." );
   locals[1] = 47;
   locals[2] = 48;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0e28;

   break;

   case 2:

   break;

   } // end switch

   say( "Please, Avatar -- we need to know everything you discover, and thou wilt need to know what progress others in the castle have made." );
   label_0e28:;

   say( "Which reminds me! Both Nystul and Nelson asked me to send thee to see them." );
} // end func

void func_0e2e() {

   int locals[22];

   say( "Nystul said he had some advice for thee." );
   locals[1] = 52;
   locals[2] = 53;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0e76;

   break;

   case 2:

   break;

   } // end switch

   say( "Avatar! Next to thee, Nystul is our greatest asset in this fight!" );
   goto label_0e79;

   label_0e76:;

   say( "The others are quite anxious to hear of thy progress!" );
   label_0e79:;

   say( "Oh, and Mayor Patterson was looking for thee -- he seemed quite anxious to speak with thee." );
} // end func

void func_0e7f() {

   int locals[22];

   say( "Avatar, thy news is extraordinary! Perhaps this other world might hold the key to our escape." );
   locals[1] = 58;
   locals[2] = 59;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0ec7;

   break;

   } // end switch

   say( "It must have been a gloomy place, indeed!" );
   return;

   label_0ec7:;

   say( "I am sure Nystul would be well able to advise thee in this." );
} // end func

void func_0ecd() {

   int locals[24];

   say( "The castle has been quiet recently, save for the servants, who have become increasingly rude and irritable." );
   locals[1] = 63;
   locals[2] = 64;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0f15;

   break;

   case 2:

   break;

   } // end switch

   say( "Indeed, and yet it behooves all of us to work together, and not complain over trivialities, as Nanna has been doing!" );
   goto label_0f18;

   label_0f15:;

   say( "I am sure they would listen to you, Avatar. Thou shouldst speak to Nanna first." );
   label_0f18:;

   locals[23] = 280;
   locals[24] = 1;
   if ( find_inv( 2, &locals[24], &locals[23] ) ) {

      say( "Oh! And if thou hast not already done so, thou shouldst take that gem thou didst find to Nystul -- 'tis an intriguing artifact, and I am sure he would be fascinated to take a look at it." );
   } // end if

} // end func

void func_0f38() {

   int locals[22];

   say( "To be frank, Avatar, I am most concerned about our water supply! Even if we shut off the fountain in the courtyard, we are still going to have to conserve as much as possible." );
   locals[1] = 69;
   locals[2] = 70;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0f7e;

   break;

   } // end switch

   say( "Our people are doing all right, so far." );
   label_0f7e:;

   say( "Come to think of it, Feridwyn seems to have something on his mind, and Sir Dupre has been so restless lately! He is always drawing his sword and sheathing it again!  Perhaps thou couldst find some way for him to help thee." );
} // end func

void func_0f84() {

   int locals[33];

   locals[1] = 1;
   locals[2] = 1;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
   npc_goal = 1;
   private[75] = 1;
   say( "Well, it seems Nystul had something to say to thee, and Patterson has seemed rather anxious lately -- thou shouldst talk to him." );
   locals[5] = 74;
   print( 1, &locals[5] );
   locals[6] = 129;
   switch_pic( 1, &locals[6] );
   say( "Er...Lady Miranda?\m" );
   locals[7] = 136;
   switch_pic( 1, &locals[7] );
   say( "Yes? What is it, Jenner? I am having an important discussion with the Avatar!\m" );
   locals[8] = 129;
   switch_pic( 1, &locals[8] );
   say( "I hardly know how to say this... but Lady Tory...\m" );
   locals[9] = 136;
   switch_pic( 1, &locals[9] );
   say( "Yes? Out with it!\m" );
   locals[10] = 129;
   switch_pic( 1, &locals[10] );
   say( "Julia just found her, @GS105. I...she's been killed.\m" );
   locals[11] = 80;
   locals[12] = 81;
   locals[13] = 0;
   locals[32] = babl_menu( 0, &locals[11] );
   switch ( locals[32] ) {

   case 1:

      goto label_1066;

   break;

   case 2:

      goto label_106b;

   break;

   } // end switch

   label_1066:;

   say( "Er, it seems she was stabbed, @GS105. In her room.\m" );
   goto label_1070;

   label_106b:;

   say( "I don't know, @GS105. No one knows anything.\m" );
   goto label_1070;

   label_1070:;

   label_1070:;

   locals[33] = 136;
   switch_pic( 1, &locals[33] );
   say( "@GS8, thou hadst better go at once and investigate this. I shall inform the others." );
   func_0156();
} // end func

void func_1086() {

   say( "I have told the others the news, Avatar. I don't believe there is anything we can do at the moment. Clearly though, someone has struck at the only one among us who might have detected a traitor." );
} // end func

void func_1091() {

   int locals[44];

   say( "@GS8, thou shouldst go see Nelson at once!" );
   locals[1] = 87;
   locals[2] = 88;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_10d7;

   break;

   case 2:

   break;

   } // end switch

   say( "Please, Avatar, this is extremely important to him!" );
   label_10d7:;

   say( "He has been pacing through the castle like a madman, muttering aloud! I think he is on the verge of a discovery that might change the entire situation!" );
   locals[23] = 91;
   locals[24] = 92;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_111a;

   break;

   case 2:

   break;

   } // end switch

   say( "Avatar, thou must cooperate with the others in the castle, or we shall never get out of here!" );
   func_0156();
   label_111a:;

   say( "Please do!" );
   func_0147();
} // end func

void func_1122() {

   int locals[1];

   locals[1] = 95;
   print( 1, &locals[1] );
   say( "I am sorry. At least thou hast avenged our betrayal -- I am certain we need fear no more traitors in THIS castle. I pity him, that is all." );
   func_0156();
} // end func

void func_113d() {

   say( "Yes -- I have been looking everywhere for thee! Nystul is in a hysterical state -- he says thou must see him at once!" );
} // end func

void func_1148() {

   say( "At night I hear the black jewel creak and groan, as if under great strain -- I feel thine efforts are having some strong effect." );
} // end func

void func_1153() {

   say( "Thou shouldst see Nystul at once about thine encounter with Mors Gotha -- I am sure he will be most interested." );
} // end func

void func_115e() {

   say( "'Tis quite a story thou hast told, Avatar. Perhaps thou shouldst share it with Nystul -- he may have heard of this "Praecor Loth."" );
} // end func

void func_1169() {

   say( "Just now I heard a great commotion over at the servants' quarters -- it seems Charles has made some sort of discovery in the storerooms -- he is most proud of himself!" );
} // end func

void func_1174() {

   int locals[22];

   say( "Avatar, thou hast done much on our behalf, but it may not be enough!" );
   locals[1] = 103;
   locals[2] = 104;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "The gem is certainly weakening, but Nystul tells me we have not quite obtained the power necessary to destroy it! And meanwhile, I have been having terrible dreams! If Lord Draxinusom is not victorious, we may emerge to find the Guardian's troops on our doorstep!" );
} // end func

void func_11bb() {

   int locals[11];

   locals[10] = 1;
   locals[11] = 0;
   if ( private[78] >= 128 ) {

      locals[0] = 106;
      locals[10] = locals[10] + 1;
      private[78] = private[78] - 128;
   } // end if

   if ( private[78] >= 64 ) {

      locals[0] = 107;
      locals[10] = locals[10] + 1;
      private[78] = private[78] - 64;
   } // end if

   if ( private[78] >= 32 ) {

      locals[0] = 108;
      locals[10] = locals[10] + 1;
      private[78] = private[78] - 32;
   } // end if

   if ( private[78] >= 16 ) {

      locals[0] = 109;
      locals[10] = locals[10] + 1;
      private[78] = private[78] - 16;
   } // end if

   if ( private[78] >= 8 ) {

      locals[0] = 110;
      locals[10] = locals[10] + 1;
      private[78] = private[78] - 8;
   } // end if

   if ( private[78] >= 4 ) {

      locals[0] = 111;
      locals[10] = locals[10] + 1;
      private[78] = private[78] - 4;
   } // end if

   if ( private[78] >= 2 ) {

      locals[0] = 112;
      private[78] = private[78] - 2;
      locals[10] = locals[10] + 1;
   } // end if

   if ( private[78] >= 1 ) {

      locals[0] = 113;
      locals[10] = locals[10] + 1;
      private[78] = private[78] - 1;
   } // end if

   if ( locals[10] > 2 ) {

      say( "The Guardian can no longer draw power from these places:" );
      switch ( locals[10] ) {

      case 9:

         locals[11] = 1;
      break;

      case 1:

         locals[10] = locals[10] - 1;
         say( "@SS1SI10\n"
      "" );
      break;

      locals[11];  // expr. has value on stack!
      say( "Why, 'tis all the known planes of reality!" );
      } // end switch

   } else {

      say( "The Guardian can no longer draw power from @SS1C1." );
   } // end if

} // end func

conversation #138
string block 0x0e89, name Nell

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05c5();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[102];

   if ( private[0] == 0 ) {

      func_0836();
      private[74] = 0;
   } // end if

   locals[5] = 0;
   locals[6] = 110;
   if ( get_quest( 1, &locals[6] ) ) {

      say( "Is it true thou canst shatter the gem, Avatar?" );
      locals[7] = 7;
      locals[8] = 8;
      locals[9] = 0;
      locals[28] = babl_menu( 0, &locals[7] );
      switch ( locals[28] ) {

      case 1:

      break;

      case 2:

         goto label_063b;

      break;

      } // end switch

      say( "'Tis a miracle!" );
      locals[29] = 2;
      func_0136( &locals[29] );
      label_063b:;

      say( "Please, try what thou canst! If the Guardian's soldiers are not stopped soon, all shall be lost!" );
      func_0156();
   } // end if

   locals[30] = 109;
   if ( get_quest( 1, &locals[30] ) ) {

   } else {

      say( "In a minute, in a minute! We must go hear what Lord British is saying!" );
      func_0165();
   } // end if

   locals[31] = 110;
   if ( get_quest( 1, &locals[31] ) ) {

      say( "Please, @GS8, the soldiers are almost upon us. Begin the ceremony!" );
      func_0156();
   } // end if

   locals[32] = 116;
   if ( get_quest( 1, &locals[32] ) == 1 ) {

      if ( !private[74] ) {

         say( "@GS8, I have heard of Lord British's decision regarding the domestic management. Thou hast struck a mighty blow for the working people of Britannia!" );
         npc_attitude = 3;
         private[74] = 1;
         locals[2] = 0;
         locals[5] = 1;
      } // end if

   } // end if

} // end if

locals[33] = 115;
if ( get_quest( 1, &locals[33] ) == 1 ) {

   func_0a51();
} // end if

locals[1] = 0;
locals[2] = 0;
locals[4] = func_035a();
switch ( locals[4] ) {

case 0:

   private[73] = 0;
break;

case 1:

   private[73] = 1;
break;

locals[34] = locals[4];
0 == locals[34];  // expr. has value on stack!
locals[1] = 1;
} // end switch

if ( 1 == locals[34] ) {

   locals[35] = 1;
   func_089d( &locals[35], 69 );
   locals[2] = 1;
} else {

   if ( locals[5] ) {

   } else {

      if ( locals[2] ) {

      } else {

         if ( private[0] == 0 && locals[2] == 0 ) {

            say( "What is it, Avatar?" );
         } else {

            if ( npc_attitude == 1 ) {

               say( "YES?" );
            } // end if

            if ( locals[1] ) {

               say( "How may I help thee, Avatar?" );
            } else {

               say( "What can I do for thee?" );
            } // end if

         } // end if

      } // end if

   } // end if

   label_074e:;

   locals[57] = locals[2];
   locals[36] = 18;
   locals[58] = locals[1];
   locals[37] = 19;
   locals[59] = 1;
   locals[38] = 20;
   locals[60] = 1;
   locals[39] = 21;
   locals[40] = 0;
   locals[78] = babl_fmenu( 0, &locals[36], &locals[57] );
   switch ( locals[78] ) {

   case 18:

      locals[79] = 0;
      func_089d( &locals[79], 69 );
   break;

   case 19:

      locals[80] = 0;
      func_089d( &locals[80], 69 );
   break;

   case 20:

      func_11be();
   break;

   case 21:

      func_0165();
   break;

   } // end switch

   say( "Will that be all, @GS8?" );
   locals[81] = 23;
   locals[82] = 24;
   locals[83] = 0;
   locals[102] = babl_menu( 0, &locals[81] );
   switch ( locals[102] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "Of course. What hast thou in mind?" );
      goto label_074e;

   break;

   } // end switch

} // end func

void func_0836() {

   private[2][1] = 4;
   private[18][1] = 0;
   private[18][2] = 1;
   private[18][3] = 2;
   private[18][4] = 3;
   private[18][5] = 5;
   private[18][6] = 8;
   private[18][7] = 11;
   private[18][8] = 13;
   private[18][9] = 14;
   private[34] = 1;
   private[35] = 9;
   private[36] = 0;
} // end func

void func_089d() {

   int locals[2];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      func_0981();
   } else {

      if ( 1 == locals[1] ) {

         func_09d3();
      } else {

         if ( 2 == locals[1] ) {

            func_0e32();
         } else {

            if ( 3 == locals[1] ) {

               func_0ec2();
            } else {

               if ( 4 == locals[1] ) {

                  if ( param1[0]play_hunger ) {

                     locals[2] = 116;
                     if ( get_quest( 1, &locals[2] ) == 0 ) {

                        say( "Avatar, I must speak to thee at once!" );
                     } // end if

                  } else {

                     func_0b47();
                  } // end if

               } else {

                  if ( 5 == locals[1] ) {

                     func_0ecf();
                  } else {

                     if ( 8 == locals[1] ) {

                        func_0fa7();
                     } else {

                        if ( 11 == locals[1] ) {

                           func_10c5();
                        } else {

                           if ( 13 == locals[1] ) {

                              func_11b1();
                           } else {

                              if ( 14 == locals[1] ) {

                                 func_112e();
                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_0981() {

   int locals[22];

   say( "Lord British's behavior is becoming more and more offensive! "Servants, take an inventory"! No "please," no "thank you," no mention of "far-famed organizational powers!" I wonder what he thinks he would do without us!" );
   locals[1] = 28;
   locals[2] = 29;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_09c6;

   break;

   case 2:

      goto label_09cb;

   break;

   } // end switch

   label_09c6:;

   say( "Hmf!" );
   func_0156();
   label_09cb:;

   say( "Pull together? I spend all day searching the storerooms, shooing away rats, while he sits on his throne looking noble, staring into the middle distance! I suppose that's what you call pulling together!" );
   func_0156();
} // end func

void func_09d3() {

   int locals[24];

   say( "Avatar, what do heroes such as thee DO all day?" );
   locals[1] = 33;
   locals[2] = 34;
   locals[3] = 35;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

      goto label_0a3b;

   break;

   } // end switch

   say( "Today I counted, inspected, and stored 73 separate items of food, chased 2 giant rats out of the cellars with just a broom, served two meals to the entire castle, and kept Patterson out of trouble the entire day, mostly. I suppose they'll never name an island after me, though." );
   locals[23] = 37;
   print( 1, &locals[23] );
   func_0156();
   label_0a3b:;

   say( "Oh. Well, I suppose thou'rt doing thy part, at any rate." );
   locals[24] = 39;
   print( 1, &locals[24] );
   func_0147();
} // end func

void func_0a51() {

   int locals[23];

   locals[1] = 115;
   if ( get_quest( 1, &locals[1] ) == 1 ) {

      say( "We are on strike, Avatar. There is nothing I can do for thee." );
      locals[2] = 41;
      locals[3] = 42;
      locals[4] = 43;
      locals[5] = 44;
      locals[6] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         func_0156();
      break;

      case 2:

         func_0ad8();
      break;

      case 3:

      break;

      case 4:

         func_0ae5();
      break;

      } // end switch

      say( "Then I suppose we lowly servants (and that includes thee, Avatar, in case thou wert not aware of it) must await his decision! Until then, the strike continues!" );
      func_0156();
   } // end if

} // end func

void func_0ad8() {

   say( "If thou hast nothing new to say, then neither have I." );
   func_0156();
} // end func

void func_0ae5() {

   int locals[22];

   say( "Hast thou?  Wilt thou take our demands to Lord British?" );
   locals[1] = 48;
   locals[2] = 49;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b2d();
   break;

   case 2:

      func_0b3a();
   break;

   } // end switch

} // end func

void func_0b2d() {

   say( "Excellent! If Lord British will grant our requests, I shall call off the strike." );
   func_0165();
} // end func

void func_0b3a() {

   say( "Then we have little more to discuss." );
   func_0156();
} // end func

void func_0b47() {

   int locals[23];

   locals[1] = 116;
   if ( get_quest( 1, &locals[1] ) ) {

      say( "Thine efforts on our behalf have opened the door to real social change in Britannia!" );
   } else {

      say( "I find it insulting that we 'servants' are treated with so little respect. Lord British has become accustomed to ordering us about like animals!" );
      locals[2] = 54;
      locals[3] = 55;
      locals[4] = 56;
      locals[5] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         func_0bb9();
      break;

      case 2:

         func_0c01();
      break;

      case 3:

         func_0c49();
      } // end if

   break;

   } // end switch

} // end func

void func_0bb9() {

   int locals[22];

   say( "Thou art just like the rest of the nobility! Thou hast no idea what 'tis like to be a member of the working classes. We enjoy none of the privileges and benefits afforded to those of noble rank. And in the past year, the situation has worsened, both in the castle and in Britannia at large." );
   locals[1] = 58;
   locals[2] = 59;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0c49();
   break;

   case 2:

      func_0c01();
   break;

   } // end switch

} // end func

void func_0c01() {

   int locals[22];

   say( "Thou might be surprised, Avatar, at how quickly things here would degenerate without the castle 'servants.' Given what we do, we deserve social equality!" );
   locals[1] = 61;
   locals[2] = 62;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0c49();
   break;

   case 2:

      func_0c49();
   break;

   } // end switch

} // end func

void func_0c49() {

   int locals[44];

   say( "First off, we should not be called 'servants.' 'Tis a demeaning term, and overused here in the castle.  We should be given the title of 'Domestic Management.'" );
   locals[1] = 64;
   locals[2] = 65;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0c8f;

   break;

   } // end switch

   say( "And why should I be kidding?" );
   label_0c8f:;

   say( "Aren't we all 'servants,' in truth?  Lord British himself hath taken an oath to serve the people of Britannia -- should we not call him a 'servant,' then? The word implies that we are not entitled to basic human dignity! It should be discarded." );
   locals[23] = 68;
   locals[24] = 69;
   locals[25] = 70;
   locals[26] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      func_0cf3();
   break;

   case 2:

      func_0cf3();
   break;

   case 3:

      func_0ce6();
   break;

   } // end switch

} // end func

void func_0ce6() {

   say( "'Tis not silly, and 'tis not all." );
   func_0cf3();
} // end func

void func_0cf3() {

   int locals[22];

   say( "More importantly, we desire a voice in the decisions that affect life here in the castle. We toil here every day, working just as hard as the nobles, if not harder. And yet we are never consulted on issues of day-to-day management. 'Tis like we are but children here!" );
   locals[1] = 73;
   locals[2] = 74;
   locals[3] = 75;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0d4f();
   break;

   case 2:

      func_0d5c();
   break;

   case 3:

      func_0d5c();
   break;

   } // end switch

} // end func

void func_0d4f() {

   say( "Is it not? In an environment such as this, methinks it is not just possible, but a moral imperative!" );
   func_0d5c();
} // end func

void func_0d5c() {

   int locals[24];

   say( "Avatar, wouldst thou take our grievances to Lord British? Thou art one of his most trusted friends, and he wouldst take thee seriously.  We only ask for a leveling of the unfair class structure that is so exemplified by life in the castle. Wilt thou do it?" );
   locals[1] = 114;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   locals[3] = 78;
   locals[4] = 79;
   locals[5] = 80;
   locals[6] = 0;
   locals[24] = babl_menu( 0, &locals[3] );
   switch ( locals[24] ) {

   case 1:

      func_0dcf();
   break;

   case 2:

      func_0e01();
   break;

   case 3:

      func_0e25();
   break;

   } // end switch

} // end func

void func_0dcf() {

   int locals[3];

   locals[1] = 81;
   print( 1, &locals[1] );
   say( "We shall soon see what is too much!  As of this moment, I declare the Domestic Management of Castle British to be on strike!" );
   locals[2] = 115;
   locals[3] = 1;
   set_quest( 2, &locals[3], &locals[2] );
   func_0156();
} // end func

void func_0e01() {

   int locals[2];

   say( "I am sorry thou dost feel that way. Although I regret what we must do, I feel in my deepest heart that 'tis necessary. I hereby declare the Domestic Management of Castle British to be on strike!" );
   locals[1] = 115;
   locals[2] = 1;
   set_quest( 2, &locals[2], &locals[1] );
   func_0156();
} // end func

void func_0e25() {

   say( "I knew that thou wouldst understand our situation, @GS8. Thou art truly a champion of the working class!" );
   func_0165();
} // end func

void func_0e32() {

   int locals[22];

   say( "Patterson was fetching supplies for me, and spilled a whole bushel of apples down the stairs. Nearly half of them are badly bruised. What are we going to do with him?" );
   locals[1] = 86;
   locals[2] = 87;
   locals[3] = 88;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0e8e();
   break;

   case 2:

      func_0e9b();
   break;

   case 3:

      func_0eb5();
   break;

   } // end switch

} // end func

void func_0e8e() {

   say( "He did volunteer for the job, so perhaps I'd best not complain. But usually he tries too hard to be helpful, and makes a nuisance of himself instead." );
   func_0ea8();
} // end func

void func_0e9b() {

   say( "I'm not sure I'd wish his 'help' on anyone else!" );
   func_0ea8();
} // end func

void func_0ea8() {

   say( "For all his experience as mayor, he is quite useless for more practical tasks. A typical specimen of the ruling class!" );
   func_0165();
} // end func

void func_0eb5() {

   say( "I'd not be so extreme as that, Avatar. But we would be better off if he'd simply stay out of the way." );
   func_0ea8();
} // end func

void func_0ec2() {

   say( "Grrrr . . . that Lord British! Could he be more condescending!?!" );
   func_0156();
} // end func

void func_0ecf() {

   int locals[22];

   say( "The Guardian has been attempting to sway my loyalties away from thee and Lord British!" );
   locals[1] = 95;
   locals[2] = 96;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0f24();
   break;

   case 2:

      func_0f17();
   break;

   } // end switch

} // end func

void func_0f17() {

   say( "Oh, do not worry. There is no danger of him convincing me." );
   func_0f24();
} // end func

void func_0f24() {

   int locals[22];

   say( "He hath promised me a world where the workers have equal representation in all levels of government, if only I wouldst be loyal to him." );
   locals[1] = 99;
   locals[2] = 100;
   locals[3] = 101;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0f9a();
   break;

   case 2:

      func_0f8d();
   break;

   case 3:

      func_0f80();
   break;

   } // end switch

} // end func

void func_0f80() {

   say( "He hath misjudged what I desire, then." );
   func_0f9a();
} // end func

void func_0f8d() {

   say( "I have no intention of giving into that red scoundrel." );
   func_0f9a();
} // end func

void func_0f9a() {

   say( "My true desire is to see Britannia's social order change, but from within, and willingly. I do not simply want equality and an end to class structure. I wish that all people, nobles and peasants alike, should first understand the need for that change, and then strive themselves to achieve it." );
   func_0165();
} // end func

void func_0fa7() {

   int locals[22];

   say( "Avatar, hast thou heard the horrible news? Lady Tory has been murdered!" );
   locals[1] = 106;
   locals[2] = 107;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0fef();
   break;

   case 2:

      func_1059();
   break;

   } // end switch

} // end func

void func_0fef() {

   int locals[23];

   locals[1] = 108;
   print( 1, &locals[1] );
   say( "How could something like that happen here? And to Lady Tory, who was such a kindly woman. 'Tis not fair that such a thing should happen! Not fair!" );
   locals[2] = 110;
   locals[3] = 111;
   locals[4] = 112;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_1066();
   break;

   case 2:

      func_108f();
   break;

   case 3:

      func_10aa();
   break;

   } // end switch

} // end func

void func_1059() {

   say( "She was stabbed in her room, stabbed several times!" );
   func_0fef();
} // end func

void func_1066() {

   int locals[2];

   locals[1] = 114;
   print( 1, &locals[1] );
   say( "I am sorry, Avatar. I know I should be strong, but 'twas such a frightful scene. I saw her body with mine own eyes. There was so much, so much blood..." );
   locals[2] = 116;
   print( 1, &locals[2] );
   func_ffff();
} // end func

void func_108f() {

   int locals[1];

   say( "Oh, it is, it is!" );
   locals[1] = 118;
   print( 1, &locals[1] );
   func_ffff();
} // end func

void func_10aa() {

   int locals[1];

   say( "No, I have heard nothing. Now we are trapped here in the castle with a killer! What shall we do, @GS8? What shall we do?" );
   locals[1] = 120;
   print( 1, &locals[1] );
   func_ffff();
} // end func

void func_10c5() {

   int locals[22];

   say( "Avatar, many of us have heard strange noises coming from the gem. Nystul says that it is weakening, thanks to thine efforts. Is this true?" );
   locals[1] = 122;
   locals[2] = 123;
   locals[3] = 124;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_1121();
   break;

   case 2:

      func_1121();
   break;

   case 3:

      func_1121();
   break;

   } // end switch

} // end func

void func_1121() {

   say( "Such things are beyond me, I'm afraid. But Nystul's words are encouraging, even if I do not understand them all." );
   func_0165();
} // end func

void func_112e() {

   int locals[22];

   say( "@GS8, thou art caked in mud! Is it necessary for thee to tromp about the castle like that?" );
   locals[1] = 127;
   locals[2] = 128;
   locals[3] = 129;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_118a();
   break;

   case 2:

      func_1197();
   break;

   case 3:

      func_11a4();
   break;

   } // end switch

} // end func

void func_118a() {

   say( "Just you mind where thou dost sit, Avatar. This is a castle, not a pig-pen." );
   func_0165();
} // end func

void func_1197() {

   say( "An ele-what?  Nay, do not bother to explain. I wouldst probably not understand. Just try thy best not to make the castle as dirty as thyself." );
   func_0165();
} // end func

void func_11a4() {

   say( "Avatar, thou dost have a strange sense of humor." );
   func_0165();
} // end func

void func_11b1() {

   say( "So it has come to this, has it? We are killing our own! I care not who the traitor was -- I know only that two more of us are dead, and I know not why!" );
   func_0156();
} // end func

void func_11be() {

   say( "Oh, not much. I have retained my position as head of the Royal Nursery, keeping watch over the little ones of the castle. Boots came back last week and took the children on a field trip to Paws -- I do hope they are all right!" );
} // end func

conversation #139
string block 0x0e8a, name Nelson

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05c5();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[78];

   locals[6] = 0;
   if ( private[0] == 0 ) {

      locals[5] = 1;
      private[75] = 0;
      func_07bb();
   } // end if

   locals[7] = 109;
   if ( get_quest( 1, &locals[7] ) ) {

   } else {

      say( "Avatar, thou shouldst hurry to the throne room. We must decide what on earth we're going to do!" );
      func_0165();
   } // end if

   locals[8] = 110;
   if ( get_quest( 1, &locals[8] ) ) {

      say( "They're coming, Avatar. Whatever thou hast to do, do it now, Avatar!" );
      func_0156();
   } // end if

   locals[9] = 116;
   if ( get_quest( 1, &locals[9] ) == 1 ) {

      if ( !private[74] ) {

         say( "I have heard that Lord British has granted our requests! We owe thee many thanks for helping us." );
         private[74] = 1;
         locals[6] = 1;
      } // end if

   } // end if

   locals[10] = 115;
   if ( get_quest( 1, &locals[10] ) ) {

      func_0888();
   } // end if

   if ( private[0] == 0 && locals[2] == 0 ) {

      say( "Oh Avatar -- I am so glad thou art here with us. Er, I mean, not for thy sake, you understand, but it gives me hope." );
   } else {

      if ( locals[1] ) {

         say( "How may I help thee, Avatar?" );
      } else {

         say( "Yes? May I help thee?" );
      } // end if

   } // end if

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_035a();
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[11] = locals[4];
   0 == locals[11];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[11] ) {

      locals[12] = 1;
      func_07ff( &locals[12], 69 );
      locals[2] = 1;
   } else {

      if ( locals[6] ) {

      } // end if

   } // end if

   label_06d2:;

   if ( private[75] > 7 ) {

      locals[5] = 0;
   } // end if

   locals[34] = locals[1];
   locals[13] = 12;
   locals[35] = 1;
   locals[14] = 13;
   locals[36] = locals[5];
   locals[15] = 14;
   locals[37] = 1;
   locals[16] = 15;
   locals[17] = 0;
   locals[55] = babl_fmenu( 0, &locals[13], &locals[34] );
   switch ( locals[55] ) {

   case 12:

      locals[56] = 0;
      func_07ff( &locals[56], 69 );
   break;

   case 13:

      func_0c61();
   break;

   case 14:

      func_0aa1();
   break;

   case 15:

      func_0165();
   break;

   } // end switch

   say( "Will that be all, @GS8?" );
   locals[57] = 17;
   locals[58] = 18;
   locals[59] = 0;
   locals[78] = babl_menu( 0, &locals[57] );
   switch ( locals[78] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "Of course. What hast thou in mind?" );
      goto label_06d2;

   break;

   } // end switch

} // end func

void func_07bb() {

   private[18][1] = 0;
   private[18][2] = 3;
   private[18][3] = 8;
   private[18][4] = 11;
   private[18][5] = 13;
   private[34] = 0;
   private[35] = 5;
   private[36] = 0;
   private[74] = 0;
} // end func

void func_07ff() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      func_09dd();
   } else {

      if ( 3 == locals[1] ) {

         func_0aea();
      } else {

         if ( 8 == locals[1] ) {

            func_0b6d();
         } else {

            if ( 11 == locals[1] ) {

               func_09e8();
            } else {

               if ( 13 == locals[1] ) {

                  func_0bd0();
               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_0888() {

   int locals[22];

   say( "Hello, @GS8. I must warn thee that the Domestic Management is still on strike!" );
   locals[1] = 21;
   locals[2] = 22;
   locals[3] = 23;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_08e4();
   break;

   case 2:

      func_0940();
   break;

   case 3:

      func_094d();
   break;

   } // end switch

} // end func

void func_08e4() {

   int locals[22];

   say( "If time is important, then Lord British should grant us our requests without delay! All we ask for is fairness." );
   locals[1] = 25;
   locals[2] = 26;
   locals[3] = 27;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_09b6();
   break;

   case 2:

      func_09c3();
   break;

   case 3:

      func_0156();
   break;

   } // end switch

} // end func

void func_0940() {

   say( "Given our lack of influence here, a strike is our only option." );
   func_0156();
} // end func

void func_094d() {

   int locals[22];

   say( "We are very serious, Avatar. The unfair class division in the castle has for too long been taken for granted. If we succeed here in changing the attitude of the nobility toward the working class, perhaps others elsewhere will take notice. Like Nanna says, this new way of thinking is a spectre haunting Britannia!" );
   locals[1] = 30;
   locals[2] = 31;
   locals[3] = 32;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_09a9();
   break;

   case 2:

      func_09a9();
   break;

   case 3:

      func_09d0();
   break;

   } // end switch

} // end func

void func_09a9() {

   say( "@GS8, I come from a long line of 'servants.' I have always been happy having taken up my family's profession, but in this past year I have I have come to realize that we are not treated with nearly the respect we dost deserve. I have listened often to Nanna, and I agree with her views. We have no choice but to strike." );
   func_0165();
} // end func

void func_09b6() {

   say( "'Twas never funny, @GS8. We do not enjoy being on strike. We do it because we must." );
   func_0165();
} // end func

void func_09c3() {

   say( "Thou hast probably already spoken of this with Nanna. It is not so important to me that we be called 'Domestic Management,' but I agree that we should have more control over the way this castle is run. Until that happens, we shall continue to strike." );
   func_0165();
} // end func

void func_09d0() {

   say( "'Tis a metaphor, Avatar." );
   func_09a9();
} // end func

void func_09dd() {

   say( "I am glad thou art here with us, Avatar. If there is a way to escape this... this gem, I am sure thou wilt find it. But I worry so about my darling Caroccio, outside with our son. Shouldst anything happen to them, I would perish with grief." );
} // end func

void func_09e8() {

   int locals[22];

   say( "The gem that surrounds the castle has been making the most terrifying noises! If it should crack, dost thou think we would be injured?" );
   locals[1] = 39;
   locals[2] = 40;
   locals[3] = 41;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a44();
   break;

   case 2:

      func_0a44();
   break;

   case 3:

      func_0a44();
   break;

   } // end switch

} // end func

void func_0a44() {

   int locals[22];

   say( "They scare me nearly as much as the chanting I heard before. Oh! The chanting! Did I forget to tell thee?" );
   locals[1] = 43;
   locals[2] = 45;
   locals[3] = 46;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      say( "Good! I hope it helps thee." );
   break;

   case 2:

      func_0aa1();
   break;

   case 3:

      func_0aa1();
   break;

   } // end switch

} // end func

void func_0aa1() {

   if ( private[75] > 0 && private[75] <= 2 ) {

      say( "I have told thee the only thing I can think of -- that strange voice, a man's voice, chanting in some awful language in the throne room. 'Twas perhaps four in the morning." );
   } else {

      if ( private[75] > 2 && private[75] <= 6 ) {

         say( "Thou hast asked me that enough times, Avatar! I tell thee, all I know of is the chanting in the throne room, that morning at perhaps the fourth bell!" );
      } else {

         if ( private[75] > 6 ) {

            say( "Truly, Avatar, thou dost seem to obsess on this subject. Ask someone else, can't thou?" );
         } else {

            say( "'Twas the night before this hideous gem formed around us.  At four o'clock in the morning I was awakened by a voice in the throne room. I was too scared to investigate, but it sounded like someone chanting in a very low voice. I was going to tell thee, but then the gem appeared, and that awful Guardian spoke to us, and I forgot all about it until now." );
         } // end if

      } // end if

   } // end if

   private[75] = private[75] + 1;
} // end func

void func_0aea() {

   int locals[22];

   say( "I swear someone in the castle is hoarding food! Seven whole loaves of bread disappeared last night!" );
   locals[1] = 52;
   locals[2] = 53;
   locals[3] = 54;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b46();
   break;

   case 2:

      func_0b53();
   break;

   case 3:

      func_0b60();
   break;

   } // end switch

} // end func

void func_0b46() {

   say( "'Twould be a shame if it has come to that. Can we not even trust each other in this crisis?" );
   func_0165();
} // end func

void func_0b53() {

   say( "'Tis hard to imagine that any of us would steal food, Avatar." );
   func_0165();
} // end func

void func_0b60() {

   say( "No, we have food enough to last for many months. That only makes it stranger that someone would be stealing from the store-room." );
   func_0165();
} // end func

void func_0b6d() {

   int locals[22];

   say( "I have heard of Lady Tory's death. I wouldst prefer not to talk about it." );
   locals[1] = 59;
   locals[2] = 60;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0165();
   break;

   case 2:

      func_0bb5();
   break;

   } // end switch

} // end func

void func_0bb5() {

   int locals[1];

   say( "I heard it was... that she was... oh, @GS8, 'tis such a horrible crime!  Lady Tory was a friend to everyone, and now she is... she is..." );
   locals[1] = 62;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0bd0() {

   int locals[23];

   locals[1] = 63;
   print( 1, &locals[1] );
   say( "@GS8, 'tis a cruel irony that the two most gentle people in the castle should be Patterson's two victims." );
   locals[2] = 65;
   locals[3] = 66;
   locals[4] = 67;
   locals[5] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0c3a();
   break;

   case 2:

      func_0c47();
   break;

   case 3:

      func_0c54();
   break;

   } // end switch

} // end func

void func_0c3a() {

   say( "'Tis not much of a comfort, Avatar." );
   func_0c54();
} // end func

void func_0c47() {

   say( "Art thou sure? If we do not escape from the castle soon, I fear we shall all end up dead!" );
   func_0165();
} // end func

void func_0c54() {

   say( "When Lady Tory was killed I was extremely distressed, but Nelson's slaying has turned my grief to anger. I wish there was more we could do against this Guardian." );
   func_0165();
} // end func

void func_0c61() {

   say( "This last year was wonderful -- I have married my darling Carrocio!  Lord British even allowed the ceremony to be held here in the castle. My brother Charles grumbled a bit, of course, but deep down I think he was as pleased as I." );
} // end func

conversation #140
string block 0x0e8b, name Patterson

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05c5();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[92];

   if ( private[0] == 0 ) {

      private[74] = 1;
      func_0884();
      private[37] = 0;
   } // end if

   locals[6] = 109;
   if ( get_quest( 1, &locals[6] ) ) {

   } else {

      say( "Ah, Avatar, I was just thinking... oh, just a moment. Perhaps Lord British has something to say to us." );
      func_0165();
   } // end if

   locals[7] = 1;
   locals[8] = 10001;
   if ( x_clock( 2, &locals[8], &locals[7] ) >= 13 ) {

      locals[9] = 7;
      print( 1, &locals[9] );
      say( "I say, Avatar . . . I was just telling Patterson about a new way of tunnelling through blackrock, when . . . there seems to have been some sort of misunderstanding . . ." );
      locals[10] = 9;
      print( 1, &locals[10] );
      locals[11] = 140;
      locals[12] = 5;
      babl_hack( 2, &locals[12], &locals[11] );
      locals[13] = 43;
      locals[14] = 1;
      set_quest( 2, &locals[14], &locals[13] );
      locals[15] = 15;
      locals[16] = 15;
      locals[17] = 10001;
      locals[18] = x_clock( 2, &locals[17], &locals[16] ) + 1;
      x_clock( 2, &locals[18], &locals[15] );
      locals[19] = 139;
      locals[20] = 7;
      locals[21] = 0;
      set_sequence( 3, &locals[21], &locals[20], &locals[19] );
      locals[22] = 140;
      locals[23] = 0;
      set_attitude( 2, &locals[23], &locals[22] );
      npc_hp = 0;
      func_0165();
   } // end if

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_035a();
   locals[3] = private[37] > 0;
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[24] = locals[4];
   0 == locals[24];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[24] ) {

      locals[25] = 1;
      func_0903( &locals[25], 69 );
      locals[2] = 1;
   } else {

      if ( private[0] == 0 && locals[2] == 0 ) {

         say( "Avatar! I am quite relieved thou art here." );
      } else {

         if ( locals[1] ) {

            say( "There you are, Avatar. I was just looking for thee." );
         } else {

            say( "Yes, @GS8? What may I do for thee?" );
         } // end if

      } // end if

   } // end if

   label_0757:;

   locals[5] = 1 - private[74];
   locals[47] = locals[2];
   locals[26] = 13;
   locals[48] = locals[1];
   locals[27] = 14;
   locals[49] = private[74];
   locals[28] = 15;
   locals[50] = private[36];
   locals[29] = 16;
   locals[51] = locals[3];
   locals[30] = 17;
   locals[52] = locals[5];
   locals[31] = 18;
   locals[32] = 0;
   locals[68] = babl_fmenu( 0, &locals[26], &locals[47] );
   switch ( locals[68] ) {

   case 13:

      locals[69] = 0;
      func_0903( &locals[69], 69 );
   break;

   case 14:

      locals[70] = 0;
      func_0903( &locals[70], 69 );
   break;

   case 15:

      func_08f8();
   break;

   case 16:

      func_0a64();
   break;

   case 17:

      func_055e();
   break;

   case 18:

      func_0165();
   break;

   } // end switch

   say( "Will that be all, @GS8?" );
   locals[71] = 20;
   locals[72] = 21;
   locals[73] = 0;
   locals[92] = babl_menu( 0, &locals[71] );
   switch ( locals[92] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "Of course. What hast thou in mind?" );
      goto label_0757;

   break;

   } // end switch

} // end func

void func_0884() {

   private[55][1] = 23;
   private[55][2] = 24;
   private[55][3] = 25;
   private[55][4] = 26;
   private[55][5] = 27;
   private[2][1] = 0;
   private[2][2] = 1;
   private[2][3] = 4;
   private[2][4] = 8;
   private[2][5] = 11;
   private[2][6] = 12;
   private[34] = 6;
   private[35] = 0;
   private[36] = 1;
   private[71] = 28;
} // end func

void func_08f8() {

   say( "I have remained in that fair city, as head of the Lycaeum. My studies there have kept me well occupied and quite content.  I heard that your friend Dupre had visited the city recently, but he prefered to frequent the Friendly Knave, and did not visit me in the Lycaeum." );
} // end func

void func_0903() {

   int locals[45];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( !param1[0]play_hunger ) {

      if ( private[73] ) {

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      } else {

         private[18][0] = private[18][0] + 1024;
      } // end if

   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      if ( param1[0]play_hunger ) {

         say( "'Tis good to see thee here, Avatar." );
      } else {

         func_0b7c();
      } // end if

   } else {

      if ( 1 == locals[1] ) {

         if ( param1[0]play_hunger ) {

            say( "I have noticed something odd." );
         } else {

            func_0c06();
         } // end if

      } else {

         if ( 4 == locals[1] ) {

            if ( param1[0]play_hunger ) {

               say( "Avatar, I have heard the news!" );
            } else {

               func_0c65();
            } // end if

         } else {

            if ( 8 == locals[1] ) {

               if ( param1[0]play_hunger ) {

                  say( "@GS8, I suppose thou hast heard the news." );
               } else {

                  func_0cf5();
               } // end if

            } else {

               if ( 11 == locals[1] ) {

                  say( "Hello, @GS8. Mayor Patterson was just visiting me. I have some important research I must share with thee at once!" );
                  locals[2] = 35;
                  locals[3] = 36;
                  locals[4] = 0;
                  locals[23] = babl_menu( 0, &locals[2] );
                  switch ( locals[23] ) {

                  case 1:

                     func_0d9b();
                  break;

                  case 2:

                  break;

                  } // end switch

                  say( "It must wait, Avatar -- this is too important!" );
                  func_0d9b();
               } else {

                  if ( 12 == locals[1] ) {

                     say( "Hello, @GS8. Mayor Patterson was just visiting me. I have some important research I must share with thee at once!" );
                     locals[24] = 39;
                     locals[25] = 40;
                     locals[26] = 0;
                     locals[45] = babl_menu( 0, &locals[24] );
                     switch ( locals[45] ) {

                     case 1:

                        func_0d9b();
                     break;

                     case 2:

                     break;

                     } // end switch

                     say( "It must wait, Avatar -- this is too important!" );
                     func_0d9b();
                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_0a64() {

   int locals[52];

   label_0a69:;

   say( "Of course! I find the ancient lore endlessly fascinating, and I would love to teach thee. Also, in my archaeological work I have developed an efficient method of searching small areas. Which would thou like to learn of?" );
   locals[1] = 43;
   locals[2] = 44;
   locals[3] = 45;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0abd;

   break;

   case 2:

      goto label_0afc;

   break;

   case 3:

      return;

   break;

   } // end switch

   label_0abd:;

   locals[23] = 8;
   locals[24] = 10001;
   if ( x_skills( 2, &locals[24], &locals[23] ) ) {

      locals[25] = 46;
      print( 1, &locals[25] );
   } else {

      locals[26] = 47;
      print( 1, &locals[26] );
      say( "Perhaps thou hast other things on thy mind, Avatar." );
      return;

      label_0afc:;

      locals[27] = 11;
      locals[28] = 10001;
      if ( x_skills( 2, &locals[28], &locals[27] ) ) {

         locals[29] = 49;
         print( 1, &locals[29] );
      } else {

         locals[30] = 50;
         print( 1, &locals[30] );
         say( "Perhaps we should discuss this some other time, Avatar." );
      } // end if

   } // end if

   say( "Wouldst thou like to study more?" );
   locals[31] = 53;
   locals[32] = 54;
   locals[33] = 0;
   locals[52] = babl_menu( 0, &locals[31] );
   switch ( locals[52] ) {

   case 1:

      goto label_0a69;

   break;

   case 2:

   break;

   } // end switch

} // end func

void func_0b7c() {

   int locals[44];

   say( "We are in quite a fix, aren't we? But then, I suppose that is a specialty of thine!" );
   locals[1] = 56;
   locals[2] = 57;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "Well, I have been thinking -- all of the Guardian's blackrock structures have had smaller copies of themselves inside -- it would be worthwhile searching for something similar within the castle." );
   locals[23] = 59;
   locals[24] = 60;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_0c00;

   break;

   case 2:

   break;

   } // end switch

   say( "I cannot say for certain, but a year ago, thou didst find such a thing did help thee in breaking the Guardian's power. Dost thou recall? Thou didst enter within each of the smaller shapes, to  attain thy goal." );
   return;

   label_0c00:;

   say( "'Tis hard to say. It may have been hidden, or it may contain its own defences, in some interior space. 'Tis probably not in the castle proper, though, but rather nearer the base of the sphere, in the sewers." );
} // end func

void func_0c06() {

   int locals[23];

   say( "Hast thou observed anything of the black gem's structural properties?" );
   locals[1] = 64;
   locals[2] = 65;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0c5f;

   break;

   case 2:

   break;

   } // end switch

   say( "Hmm... well, 'tis a very stable structure, very sound. I did notice some interesting acoustical properties. Listen!" );
   locals[23] = 67;
   print( 1, &locals[23] );
   say( "Extraordinary, is it not?" );
   return;

   label_0c5f:;

   say( "Yes, well, I suppose thou dost." );
} // end func

void func_0c65() {

   int locals[44];

   say( "I mean, that thou didst find a gem, that took thee to a building in another world! Just think of what this discovery means!" );
   locals[1] = 71;
   locals[2] = 72;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0caa;

   break;

   case 2:

      goto label_0caa;

   break;

   } // end switch

   label_0caa:;

   label_0caa:;

   say( "There are legends of events of other worlds, just think if we could learn their truth firsthand! The Battle of Rhyna, the Homeland of the Daemons -- any one of these things could lie through that gem!" );
   locals[23] = 74;
   locals[24] = 75;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_0cea;

   break;

   case 2:

      goto label_0cef;

   break;

   } // end switch

   label_0cea:;

   say( "No thank thee! Miranda is right -- a scholar like myself should stay in the library, out of danger. But be sure and visit me, and tell me of thy discoveries!" );
   return;

   label_0cef:;

   say( "Ah, @GS8, thou hast not the poet's heart! Still, to a hero such as thyself, perhaps such things seem commonplace." );
} // end func

void func_0cf5() {

   int locals[44];

   say( "I can hardly believe it -- I was so fond of her, @GS8. Tell me -- was it some... thing that crawled up out of the gem, or... dost thou think it could have been one of us?" );
   locals[1] = 79;
   locals[2] = 80;
   locals[3] = 81;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0d4e;

   break;

   case 2:

      goto label_0d8e;

   break;

   case 3:

      goto label_0d93;

   break;

   } // end switch

   label_0d4e:;

   say( "If I may be of any assistance... I mean, I am a scholar, not a monster-killer, but still... I would fain be allowed to help in this matter." );
   locals[23] = 83;
   locals[24] = 84;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      return;

   break;

   case 2:

      return;

   break;

   } // end switch

   label_0d8e:;

   say( "'Tis hard to imagine, Avatar. Surely, no one of us could have done that... And yet, if there were a traitor in the castle, the empath would be his or her first target." );
   return;

   label_0d93:;

   say( "'Tis a relief to hear thee say that. And yet, 'twas not one of the verminous sewer-creatures that did that. It strikes me that the killing was no random act of malice or hunger, but a deliberate attempt to remove the empath from our midst." );
   return;

} // end func

void func_0d9b() {

   int locals[75];

   locals[1] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 87;
   locals[3] = 88;
   say( "You see, @GS8, I was reading in the library, and . . .\n"
      "" );
   locals[4] = 140;
   switch_pic( 1, &locals[4] );
   say( "Yes, @GS8, but there was something I wished to discuss with thee . . .\m" );
   locals[5] = 139;
   switch_pic( 1, &locals[5] );
   say( "Please, Mayor Patterson, this is of the utmost importance. I was reading some of Batal Thaam's early texts concerning blackrock -- thou hast heard of Batal Thaam?" );
   locals[6] = 92;
   locals[7] = 93;
   locals[8] = 0;
   locals[27] = babl_menu( 0, &locals[6] );
   switch ( locals[27] ) {

   case 1:

      goto label_0e1e;

   break;

   case 2:

   break;

   } // end switch

   say( "She was one of the earliest sorcerers to develop a sense of the ether around us. Also a veteran of the Brujerian uprising -- 'tis a fascinating story, thou shouldst read it sometime...\m" );
   label_0e1e:;

   locals[28] = 140;
   switch_pic( 1, &locals[28] );
   say( "Nelson, this does not seem terribly urgent after all. Perhaps the Avatar and I have something to discuss...?\m" );
   locals[29] = 139;
   switch_pic( 1, &locals[29] );
   say( "Mayor Patterson, please! Now Batal Thaam also wrote specifically on the creation of blackrock, and its effects on the ether. But also, on how the ether can be made to have an effect on blackrock itself.\m" );
   locals[30] = 140;
   switch_pic( 1, &locals[30] );
   say( "Avatar, must we endure these abstract theories? There is work to be done!" );
   locals[31] = 98;
   locals[32] = 99;
   locals[33] = 0;
   locals[52] = babl_menu( 0, &locals[31] );
   switch ( locals[52] ) {

   case 1:

   break;

   case 2:

      goto label_0e9f;

   break;

   } // end switch

   locals[53] = 139;
   switch_pic( 1, &locals[53] );
   say( "Thank you, @GS8." );
   goto label_0eb0;

   label_0e9f:;

   locals[54] = 139;
   switch_pic( 1, &locals[54] );
   say( "Avatar, please, a little patience." );
   label_0eb0:;

   say( "Now it seems that Thaam had discovered a means of manip...\m" );
   locals[55] = 140;
   switch_pic( 1, &locals[55] );
   say( "Nelson, why are we bothering with this?\m" );
   locals[56] = 139;
   switch_pic( 1, &locals[56] );
   say( "...manipulating blackrock through a simple spell, which would allow one to perceive and act on...\m" );
   locals[57] = 140;
   switch_pic( 1, &locals[57] );
   say( "I don't think thou shouldst speak of such...\m" );
   locals[58] = 139;
   switch_pic( 1, &locals[58] );
   say( "...act on the ether, and therefore on the blackrock itself,...\m" );
   locals[59] = 140;
   switch_pic( 1, &locals[59] );
   say( "Nelson.\m" );
   locals[60] = 139;
   switch_pic( 1, &locals[60] );
   say( "'Twas a runic spell, using the runes...\m" );
   locals[61] = 140;
   switch_pic( 1, &locals[61] );
   say( "I'm sorry, Nelson.\m" );
   locals[62] = 140;
   locals[63] = 5;
   babl_hack( 2, &locals[63], &locals[62] );
   locals[64] = 110;
   print( 1, &locals[64] );
   locals[65] = 43;
   locals[66] = 1;
   set_quest( 2, &locals[66], &locals[65] );
   locals[67] = 15;
   locals[68] = 15;
   locals[69] = 10001;
   locals[70] = x_clock( 2, &locals[69], &locals[68] ) + 1;
   x_clock( 2, &locals[70], &locals[67] );
   locals[71] = 139;
   locals[72] = 7;
   locals[73] = 0;
   set_sequence( 3, &locals[73], &locals[72], &locals[71] );
   locals[74] = 140;
   locals[75] = 0;
   set_attitude( 2, &locals[75], &locals[74] );
   npc_hp = 0;
   func_0165();
} // end func

conversation #141
string block 0x0e8c, name Lady Tory

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05c5();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[78];

   if ( private[0] == 0 ) {

      func_07bd();
      private[37] = 0;
   } // end if

   locals[5] = 109;
   if ( get_quest( 1, &locals[5] ) ) {

   } else {

      say( "Avatar, a pleasure to see thee again! Let us have a talk, you and I, after Lord British finishes his little speech. For now, we should hasten there." );
      func_0165();
   } // end if

   if ( npc_hp < 5 ) {

      locals[6] = 7;
      print( 1, &locals[6] );
      say( "Oh G... Guardian, save me, I served you... I did it all... why... do you not aid me now?" );
      locals[7] = 9;
      print( 1, &locals[7] );
      say( "Stop staring at me, you... you hated me in life, anyway, false friends, now you may hate me worse in death. If you ever get out of here... tell Judith I am sorry!" );
      func_0165();
   } // end if

   locals[8] = 43;
   if ( get_quest( 1, &locals[8] ) ) {

      say( "I'm sorry, Avatar -- he's going to kill us all, and I can't... let myself go that way." );
      func_0110();
   } // end if

   locals[9] = 1;
   locals[10] = 10001;
   if ( x_clock( 2, &locals[10], &locals[9] ) >= 11 ) {

      say( "Oh, @GS8! Nelson and I were just . . . er . . . talking about an . . . idea he had . . ." );
      func_0156();
   } // end if

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_035a();
   locals[3] = private[37] > 0;
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[11] = locals[4];
   0 == locals[11];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[11] ) {

      locals[12] = 1;
      func_0821( &locals[12], 69 );
      locals[2] = 1;
   } else {

      if ( private[0] == 0 && locals[2] == 0 ) {

         say( "I am so happy to see thee here! I mean... not because thou art inside here but... er, you understand." );
      } else {

         if ( locals[1] ) {

            say( "@GS8! What a pleasure to see thee!" );
         } else {

            say( "Avatar! What a surprise, a real treat!" );
         } // end if

      } // end if

   } // end if

   label_06de:;

   locals[34] = locals[1];
   locals[13] = 16;
   locals[35] = 1;
   locals[14] = 17;
   locals[36] = private[36];
   locals[15] = 18;
   locals[37] = 1;
   locals[16] = 19;
   locals[17] = 0;
   locals[55] = babl_fmenu( 0, &locals[13], &locals[34] );
   switch ( locals[55] ) {

   case 16:

      locals[56] = 0;
      func_0821( &locals[56], 69 );
   break;

   case 17:

      func_099b();
   break;

   case 18:

      func_08da();
   break;

   case 19:

      func_0165();
   break;

   } // end switch

   say( "Will that be all, @GS8?" );
   locals[57] = 21;
   locals[58] = 22;
   locals[59] = 0;
   locals[78] = babl_menu( 0, &locals[57] );
   switch ( locals[78] ) {

   case 1:

   break;

   case 2:

      say( "Of course. What hast thou in mind?" );
      goto label_06de;

   break;

   } // end switch

   say( "Always a pleasure, @GS8." );
   func_0165();
} // end func

void func_07bd() {

   private[18][1] = 0;
   private[18][2] = 1;
   private[18][3] = 2;
   private[18][4] = 4;
   private[18][5] = 5;
   private[18][6] = 8;
   private[18][7] = 9;
   private[18][8] = 10;
   private[18][9] = 11;
   private[34] = 0;
   private[35] = 9;
   private[36] = 1;
   private[71] = 25;
} // end func

void func_0821() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      func_0a3a();
   } else {

      if ( 1 == locals[1] ) {

         func_0b03();
      } else {

         if ( 2 == locals[1] ) {

            func_0ab5();
         } else {

            if ( 4 == locals[1] ) {

               func_0b97();
            } else {

               if ( 5 == locals[1] ) {

                  func_0c21();
               } else {

                  if ( 8 == locals[1] ) {

                     func_0d95();
                  } else {

                     if ( 9 == locals[1] ) {

                        func_0cf7();
                     } else {

                        if ( 10 == locals[1] ) {

                           func_0cae();
                        } else {

                           if ( 11 == locals[1] ) {

                              func_0db0();
                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_08da() {

   int locals[48];

   say( "Surely I will help thee! Not for nothing did I serve as mayor of Britannia's largest town. I shall give thee a few pointers about dealing with people! But it will take some time -- hast thou a moment to spare?" );
   locals[1] = 27;
   locals[2] = 28;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   label_091d:;

   locals[23] = 15;
   locals[24] = 10001;
   if ( x_skills( 2, &locals[24], &locals[23] ) ) {

      locals[25] = 29;
      print( 1, &locals[25] );
   } else {

      locals[26] = 30;
      print( 1, &locals[26] );
   } // end if

   say( "Wouldst thou speak some more on this subject?" );
   locals[27] = 32;
   locals[28] = 33;
   locals[29] = 0;
   locals[48] = babl_menu( 0, &locals[27] );
   switch ( locals[48] ) {

   case 1:

      goto label_091d;

   break;

   case 2:

   break;

   } // end switch

   say( "Of course -- come to me any time." );
} // end func

void func_099b() {

   int locals[44];

   say( "Well, Avatar, I shall not soon forget our last encounter! Thou didst teach me a lesson in honesty that was long past due, and though it hurts my pride, I must thank thee for it. Adultery is an ugly sin, but an easy one to fall into. Ah, 'tis a relief to be living without lies again." );
   locals[1] = 36;
   locals[2] = 37;
   locals[3] = 38;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_09f4;

   break;

   case 2:

      goto label_0a34;

   break;

   case 3:

      goto label_0a34;

   break;

   } // end switch

   label_09f4:;

   say( "Though we separated for a time, I am glad to tell thee Judith and I are together once again!" );
   locals[23] = 40;
   locals[24] = 41;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_0a34;

   break;

   case 2:

      goto label_0a34;

   break;

   } // end switch

   label_0a34:;

   label_0a34:;

   label_0a34:;

   label_0a34:;

   say( "Again, I thank thee." );
} // end func

void func_0a3a() {

   int locals[22];

   say( "I am glad to have a chance to speak with thee. I just wanted to say, I have always been a great admirer of thine, and 'tis good to be working with thee. If there is anything I can do to help out..." );
   locals[1] = 44;
   locals[2] = 45;
   locals[3] = 46;
   locals[4] = 47;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0aaa;

   break;

   case 2:

      goto label_0aaf;

   break;

   case 3:

      goto label_0aaf;

   break;

   case 4:

      say( "Er..." );
      goto label_0aaf;

   break;

   } // end switch

   label_0aaa:;

   say( "Well, thou hast only to call on me, and I shall be ready!" );
   return;

   label_0aaf:;

   label_0aaf:;

   label_0aaf:;

   say( "Thank thee, Avatar! I shall do as thou sayest." );
} // end func

void func_0ab5() {

   int locals[22];

   say( "Is it true thou hast found some sort of gateway, in the sewers?" );
   locals[1] = 52;
   locals[2] = 53;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0afd;

   break;

   } // end switch

   say( "'Tis always the way with me! We've a saying in the town of Britain, when, for instance, you buy an ox and it falls dead the next day: "'Tis Patterson's luck has found ye!"" );
   return;

   label_0afd:;

   say( "I would not count on it, Avatar -- I am more concerned about what will come through the gate to find us!" );
} // end func

void func_0b03() {

   int locals[26];

   locals[1] = sex( 2, &locals[3], &locals[2] );
   locals[2] = 56;
   locals[3] = 57;
   say( "I have heard thou hast begun exploring beneath the castle -- surely there is naught there but a few rotten supplies, musty tunnels... I'm sure the libraries would prove more productive." );
   locals[4] = 59;
   locals[5] = 60;
   locals[6] = 61;
   locals[7] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

      goto label_0b77;

   break;

   case 2:

      goto label_0b81;

   break;

   case 3:

      goto label_0b7c;

   break;

   } // end switch

   label_0b77:;

   say( "Perhaps thou art right...but I fear the gem has sealed us in for good." );
   return;

   label_0b7c:;

   say( "I see that thou art a @SS1 of deep insight! I am sure thy scholarly investigations will save us all!" );
   return;

   label_0b81:;

   locals[26] = 64;
   print( 1, &locals[26] );
   say( "Do what seems best to thee!" );
   return;

} // end func

void func_0b97() {

   int locals[44];

   say( "I had quite a scare this morning, as Iolo may have told thee!" );
   locals[1] = 67;
   locals[2] = 68;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0bdd;

   break;

   case 2:

   break;

   } // end switch

   say( "Why, he played the part of my rescuer!" );
   label_0bdd:;

   say( "A spider had me cornered in the basement, a real brute the size of a dog! Iolo found me and drove it off, thank the serpent." );
   locals[23] = 71;
   locals[24] = 72;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      return;

   break;

   case 2:

   break;

   } // end switch

   say( "I was hoping to find some wine or ale, to calm down Dupre -- he has been so nervous lately." );
} // end func

void func_0c21() {

   int locals[22];

   say( "'Tis disheartening, Avatar -- I try to help the others out, but it never seems to come out right! Now it seems like the whole castle is avoiding me. 'Tis strange to feel so alone, when trapped in a castle with a score of other humans." );
   locals[1] = 75;
   locals[2] = 76;
   locals[3] = 77;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0c8a();
   break;

   case 2:

      func_0ca3();
   break;

   case 3:

      func_0c7d();
   break;

   } // end switch

} // end func

void func_0c7d() {

   say( "Well, I guess I shall see thee later, @GS8..." );
   func_0147();
} // end func

void func_0c8a() {

   int locals[1];

   say( "I am glad to hear thee say that, @GS8. Very glad." );
   locals[1] = 80;
   print( 1, &locals[1] );
} // end func

void func_0ca3() {

   say( "Yes, 'tis a common sentiment 'round here." );
} // end func

void func_0cae() {

   int locals[22];

   say( "Avatar! I have seen a most extraordinary thing! I was wandering through a basement storeroom, when I came upon an ancient scroll, which spoke of a secret cache of Filanium on Talorus, "near the lava pits!" Could this be of any help to thee?" );
   locals[1] = 83;
   locals[2] = 84;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   say( "At last I am of some use!" );
} // end func

void func_0cf7() {

   int locals[46];

   say( "I have heard of thy discovery of a peaceful world, ruled by a regent of the Guardian! Is it possible... dost thou think we, too... oh, never mind, I shouldn't say it!" );
   locals[1] = 87;
   locals[2] = 88;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   say( "What I mean to say... perhaps to live under the Guardian would not... be that bad?" );
   locals[23] = 90;
   locals[24] = 91;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      return;

   break;

   case 2:

   break;

   } // end switch

   say( "I see. Perhaps thou art right." );
   locals[45] = 113;
   locals[46] = 1;
   set_quest( 2, &locals[46], &locals[45] );
} // end func

void func_0d95() {

   int locals[1];

   say( "What has happened, @GS8, I can't think about it... I just can't think about it!" );
   locals[1] = 94;
   print( 1, &locals[1] );
   func_0156();
} // end func

void func_0db0() {

   int locals[44];

   say( "Avatar, dost thou think we will ever get out of here?" );
   locals[1] = 96;
   locals[2] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   if ( locals[22] == 1 ) {

   } // end if

   say( "I am not so sure! At night I have awful dreams . . . even if we do get out of here, what if his men have conquered Britannia?" );
   locals[23] = 98;
   locals[24] = 99;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_0e1f;

   break;

   case 2:

      goto label_0e24;

   break;

   } // end switch

   label_0e1f:;

   say( "You're right! I had not thought of that!" );
   return;

   label_0e24:;

   say( "Yes... I suppose we can just hope." );
} // end func

conversation #142
string block 0x0e8d, name Lord British

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_05c5();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[74];

   if ( private[0] == 0 ) {

      func_079c();
      private[37] = 0;
   } // end if

   locals[5] = 109;
   if ( get_quest( 1, &locals[5] ) ) {

   } else {

      say( "I think it best that we listen to what Lord British has to say -- perhaps he will have a calming effect on the group." );
      func_0165();
   } // end if

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_035a();
   locals[3] = private[37] > 0;
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[6] = locals[4];
   0 == locals[6];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[6] ) {

      locals[7] = 1;
      func_07e8( &locals[7], 69 );
      locals[2] = 1;
   } else {

      if ( private[0] == 0 && locals[2] == 0 ) {

         say( "@GS8! For all our sakes, it is good that thou art here." );
      } else {

         if ( locals[1] ) {

            say( "Hello again, @GS8, I was just looking for thee." );
         } else {

            say( "Hello there, @GS8." );
         } // end if

      } // end if

   } // end if

   label_067a:;

   locals[29] = locals[2];
   locals[8] = 10;
   locals[30] = locals[1];
   locals[9] = 11;
   locals[31] = 1;
   locals[10] = 12;
   locals[32] = private[36];
   locals[11] = 13;
   locals[33] = locals[3];
   locals[12] = 14;
   locals[34] = 1;
   locals[13] = 15;
   locals[14] = 0;
   locals[50] = babl_fmenu( 0, &locals[8], &locals[29] );
   switch ( locals[50] ) {

   case 10:

      locals[51] = 0;
      func_07e8( &locals[51], 69 );
   break;

   case 11:

      locals[52] = 0;
      func_07e8( &locals[52], 69 );
   break;

   case 12:

      func_0d84();
   break;

   case 13:

      func_087d();
   break;

   case 14:

      func_055e();
   break;

   case 15:

      func_0165();
   break;

   } // end switch

   say( "Will that be all, @GS8?" );
   locals[53] = 17;
   locals[54] = 18;
   locals[55] = 0;
   locals[74] = babl_menu( 0, &locals[53] );
   switch ( locals[74] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "Of course. What hast thou in mind?" );
      goto label_067a;

   break;

   } // end switch

} // end func

void func_079c() {

   private[18][1] = 0;
   private[18][2] = 2;
   private[18][3] = 3;
   private[18][4] = 4;
   private[18][5] = 5;
   private[18][6] = 7;
   private[34] = 0;
   private[35] = 6;
   private[36] = 1;
   private[71] = 20;
} // end func

void func_07e8() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      func_0b67();
   } else {

      if ( 2 == locals[1] ) {

         func_0c64();
      } else {

         if ( 3 == locals[1] ) {

            func_093e();
         } else {

            if ( 4 == locals[1] ) {

               func_0ce7();
            } else {

               if ( 5 == locals[1] ) {

                  func_0a4f();
               } else {

                  if ( 7 == locals[1] ) {

                     func_0be1();
                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_087d() {

   int locals[48];

   say( "Of course, @GS8. Let us talk for a while. But this will take some time -- wilt thou stay, or dost thou have to hurry off?" );
   locals[1] = 22;
   locals[2] = 23;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0938;

   break;

   } // end switch

   label_08c0:;

   locals[23] = 15;
   locals[24] = 10001;
   if ( x_skills( 2, &locals[24], &locals[23] ) ) {

      locals[25] = 24;
      print( 1, &locals[25] );
   } else {

      locals[26] = 25;
      print( 1, &locals[26] );
   } // end if

   say( "Wouldst thou speak some more on this subject?" );
   locals[27] = 27;
   locals[28] = 28;
   locals[29] = 0;
   locals[48] = babl_menu( 0, &locals[27] );
   switch ( locals[48] ) {

   case 1:

      goto label_08c0;

   break;

   case 2:

   break;

   } // end switch

   label_0938:;

   say( "I am always available to talk with, @GS8." );
} // end func

void func_093e() {

   int locals[22];

   say( "Oh, Avatar, wilt the Guardian not leave our minds to ourselves? Each night his horrible visage invades my dreams." );
   locals[1] = 31;
   locals[2] = 32;
   locals[3] = 33;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_099a();
   break;

   case 2:

      func_09e2();
   break;

   case 3:

      func_09ef();
   break;

   } // end switch

} // end func

void func_099a() {

   int locals[22];

   say( "His voice, that awful voice, speaks to me in my sleep. Recently it has been one message, over and over again. 'Lady Tory,' it says, 'even in the darkness of thy innermost thoughts, my eyes shall be watching you.'" );
   locals[1] = 35;
   locals[2] = 36;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a37();
   break;

   case 2:

      func_0a37();
   break;

   } // end switch

} // end func

void func_09e2() {

   say( "My dreams are more vivid than thine own, @GS8, due to the nature of my empathic abilities. Still, thou art correct. They are naught but dreams, which means the Guardian is still unable to affect us directly. For that we should be thankful." );
   func_0165();
} // end func

void func_09ef() {

   int locals[22];

   say( "I know that they have. Several people have come to me recently for counsel. The Guardian seems to know what we each most fear -- and what we most desire -- and uses that to influence us in our dreams." );
   locals[1] = 39;
   locals[2] = 40;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_099a();
   break;

   case 2:

      func_0a37();
   break;

   } // end switch

} // end func

void func_0a37() {

   say( "I shouldst put my own distress aside, I know. There are others in the castle without my mental training who are in great need of my skills." );
   func_0165();
} // end func

void func_0a44() {

   say( "My nightmares doth continue, Avatar, but I am doing what I can to ignore them. Others need mine aid too much for me to succumb to the Guardian's whisperings." );
} // end func

void func_0a4f() {

   int locals[22];

   say( "Avatar, I am sensing very strong emotions from Feridwyn." );
   locals[1] = 44;
   locals[2] = 45;
   locals[3] = 46;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0aab();
   break;

   case 2:

      func_0b14();
   break;

   case 3:

      func_0aab();
   break;

   } // end switch

} // end func

void func_0aab() {

   int locals[22];

   say( "'Tis strange, but though he greatly fears what others may think of him, I can detect no guilt in him at all." );
   locals[1] = 48;
   locals[2] = 49;
   locals[3] = 50;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b07();
   break;

   case 2:

      func_0b07();
   break;

   case 3:

      func_0b07();
   break;

   } // end switch

} // end func

void func_0b07() {

   say( "He has either committed an evil act without remorse, or he is afraid of being falsely accused. Which, I cannot tell. To be honest with thee, Avatar, I do not trust the man." );
   func_0165();
} // end func

void func_0b14() {

   int locals[22];

   say( "Truthfully, I do not know what to think. I hesitate to judge Feridwyn harshly without proof, and yet his emotions are so extremely defensive!" );
   locals[1] = 53;
   locals[2] = 54;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0aab();
   break;

   case 2:

      func_0165();
   break;

   } // end switch

} // end func

void func_0b5c() {

   say( "I am still keeping my mind on Feridwyn.  He remains suspicious, though I have no proof that he has done wrong." );
} // end func

void func_0b67() {

   int locals[22];

   say( "Trapped in here as we are, I sense rising fear and anxiety in nearly everyone." );
   locals[1] = 57;
   locals[2] = 58;
   locals[3] = 59;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0bc3();
   break;

   case 2:

      func_0bc3();
   break;

   case 3:

      func_0bc3();
   break;

   } // end switch

} // end func

void func_0bc3() {

   int locals[1];

   say( "But I also sense that they have great confidence in thee, @GS8." );
   locals[1] = 61;
   print( 1, &locals[1] );
   say( "As do I, Avatar." );
   func_0165();
} // end func

void func_0be1() {

   int locals[22];

   say( "Now that we will not die of thirst, some of the tension in the castle has been lifted." );
   locals[1] = 64;
   locals[2] = 65;
   locals[3] = 66;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0c4a();
   break;

   case 2:

      func_0c57();
   break;

   case 3:

      func_0c3d();
   break;

   } // end switch

} // end func

void func_0c3d() {

   say( "The people worry about what the Guardian has planned for us." );
   func_0165();
} // end func

void func_0c4a() {

   say( "Aye, 'tis true." );
   func_0c3d();
} // end func

void func_0c57() {

   say( "I suppose that is so, but 'tis only a minor comfort." );
   func_0c3d();
} // end func

void func_0c64() {

   int locals[22];

   say( "I am sensing particularly great anxiety and turmoil in Patterson." );
   locals[1] = 71;
   locals[2] = 72;
   locals[3] = 73;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0cc0();
   break;

   case 2:

      func_0ccd();
   break;

   case 3:

      func_0cda();
   break;

   } // end switch

} // end func

void func_0cc0() {

   say( "Nay, there is too much confusion in his mind." );
   func_0cda();
} // end func

void func_0ccd() {

   say( "I have tried, several times." );
   func_0cda();
} // end func

void func_0cda() {

   say( "Patterson claims that he has received no taunts from the Guardian, but I am sure he is lying. I suspect that the Guardian has been particularly cruel to him. 'Twould be wise for me to speak with him again." );
   func_0165();
} // end func

void func_0ce7() {

   int locals[22];

   say( "I tried to talk with Patterson again, but 'twas useless. Why, he even made a pass at me!" );
   locals[1] = 78;
   locals[2] = 79;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0d2f();
   break;

   case 2:

      func_0d3c();
   break;

   } // end switch

} // end func

void func_0d2f() {

   say( "No, 'tis no jest! 'Tis a shame I had no interest in responding, but I hope I was kind to him." );
   func_0d3c();
} // end func

void func_0d3c() {

   int locals[22];

   say( "I still can detect no specific emotions in the man. His mind is a tangle of confusion. He seems to have taken a liking to thee, @GS8 -- perhaps thou can help him." );
   locals[1] = 82;
   locals[2] = 83;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0165();
   break;

   case 2:

      func_0165();
   break;

   } // end switch

} // end func

void func_0d84() {

   say( "I have spent this past year at Serpent's Hold, serving as counsellor and raising my son.  I am still in debt to thee for saving him from those accursed harpies! But now, I fear again for his safety. I left him in the care of trusted servants at Serpent's Hold, and now that there is war in Britannia, the Hold will be in an uproar. I can only hope that the Guardian has not singled out my home for a special assault." );
} // end func

conversation #143
string block 0x0e8e, name Feridwyn

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_06f2();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_045e( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_045e( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 03ec
   } // end switch

   locals[1] = locals[4];
   goto label_0456;

   label_0456:;

   return locals[1];
} // end func

void func_045e() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 052a
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_055e() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_05c5() {

   int locals[2];

   locals[1] = 128 + 15;
   locals[2] = param1[0]play_hunger + 1;
   set_quest( 2, &locals[2], &locals[1] );
} // end func

void func_05ec() {

   int locals[35];

   say( "Greetings, Avatar! Shall we begin this meeting?" );
   locals[1] = 7;
   locals[2] = 8;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0632;

   break;

   case 2:

   break;

   } // end switch

   say( "Please, Avatar, these are matters of utmost importance!\m" );
   label_0632:;

   say( "I need not tell you, citizens of Britannia, that we are near our darkest hour. The gem that surrounds our castle is made of blackrock, a substance impervious to all physical force, which stifles magical workings within its boundaries. The Guardian has this day struck Britannia a fearsome blow, and we may be sure that he will not rest idle. Doubtless, even now he is preparing an assault on the entire nation of Britannia!\m" );
   locals[23] = 136;
   switch_pic( 1, &locals[23] );
   say( "Lord British! Cannot Lord Draxinusom of the gargoyles rally our people against the invader?\m" );
   locals[24] = 142;
   switch_pic( 1, &locals[24] );
   say( "He will do what he can, certainly, but I know not whether the humans of Britannia shall follow a gargoyle leader.\m" );
   locals[25] = 140;
   switch_pic( 1, &locals[25] );
   locals[26] = 13;
   print( 1, &locals[26] );
   say( "Well, w-what can we do, then?\m" );
   locals[27] = 142;
   switch_pic( 1, &locals[27] );
   say( "Somehow, we must find a way to breach the gem. Now, to work! Servants, take an inventory of the castle storerooms! Nystul, Nelson, we shall have need of thy far-famed scholarly powers -- you must determine how the jewel was created, and how it may be destroyed. You others, warriors, and especially you, Avatar, eight times our savior, you must search the castle, above and below, for some means of escape.\m" );
   say( "Miranda, I place thee in charge of the escape effort. Thou shouldst use the Great Hall as thy headquarters. Avatar, be sure and report to her all that thou dost learn in thy search, and heed her advice in all things." );
   say( "All Britannia..." );
   locals[28] = 18;
   print( 1, &locals[28] );
   locals[29] = 109;
   locals[30] = 1;
   set_quest( 2, &locals[30], &locals[29] );
   locals[31] = 15;
   locals[32] = 15;
   locals[33] = 10001;
   locals[34] = x_clock( 2, &locals[33], &locals[32] ) + 1;
   x_clock( 2, &locals[34], &locals[31] );
   locals[35] = 32;
   func_05c5( &locals[35] );
   func_0165();
} // end func

void func_06f2() {

   int locals[83];

   locals[6] = 115;
   if ( get_quest( 1, &locals[6] ) ) {

      func_00bd( 111, 110, 109 );
      if ( private[78] > 23 && private[78] < 28 && private[79] > 46 && private[79] < 58 ) {

         private[81] = 19;
      } else {

         private[81] = 20;
      } // end if

   } // end if

   locals[7] = 112;
   if ( get_quest( 1, &locals[7] ) == 1 ) {

      func_0f89();
   } // end if

   if ( private[0] == 0 ) {

      func_09b1();
      private[75] = 0;
      locals[5] = 1;
      private[76] = 1;
      private[74] = 0;
      private[82] = 0;
      private[77] = 0;
      npc_goal = 12;
      func_05ec();
      func_0165();
   } // end if

   locals[8] = 110;
   if ( get_quest( 1, &locals[8] ) ) {

      say( "Avatar, the time to act is now! If the gem is not shattered, the Guardian's soldiers shall flood the castle in a few moments. This spell you and Nystul have prepared must not fail." );
      locals[9] = 2;
      func_0136( &locals[9] );
   } // end if

   if ( private[74] ) {

      (private[77] <= x_clock( 2, &locals[11], &locals[10] ) || private[77] > x_clock( 2, &locals[13], &locals[12] ) + 1);  // expr. has value on stack!
      locals[10] = 0;
      locals[11] = 10001;
      locals[12] = 0;
      if ( locals[13] = 10001 ) {

         func_0e44();
      } else {

         if ( private[82] > 1 ) {

            say( "Please, Avatar -- I must have solitude if I am to  come to any decision in this matter. I trust Miranda to handle any difficulties that may come up meanwhile." );
            func_0147();
         } else {

            func_0dd9();
         } // end if

      } // end if

   } // end if

   locals[14] = 114;
   if ( get_quest( 1, &locals[14] ) ) {

      func_0ca9();
   } // end if

   locals[3] = private[37] > 0;
   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_035a();
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[15] = locals[4];
   0 == locals[15];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[15] ) {

      locals[16] = 1;
      func_0a03( &locals[16], 69 );
      locals[2] = 1;
   } // end if

   if ( locals[5] ) {

      say( "Greetings, Avatar. In this dark time, 'tis good to see an old companion I can trust!" );
      locals[5] = 0;
   } else {

      if ( locals[1] ) {

         say( "Avatar, 'tis well that thou hast come." );
      } else {

         say( "Yes, @GS8? What may I do for thee?" );
      } // end if

   } // end if

   label_088f:;

   locals[38] = locals[2];
   locals[17] = 26;
   locals[39] = locals[1];
   locals[18] = 27;
   locals[40] = 1;
   locals[19] = 28;
   locals[41] = locals[3];
   locals[20] = 29;
   locals[42] = private[76];
   locals[21] = 30;
   locals[43] = 1;
   locals[22] = 31;
   locals[23] = 0;
   locals[59] = babl_fmenu( 0, &locals[17], &locals[38] );
   switch ( locals[59] ) {

   case 26:

      locals[60] = 0;
      func_0a03( &locals[60], 69 );
   break;

   case 27:

      locals[61] = 0;
      func_0a03( &locals[61], 69 );
   break;

   case 28:

      func_09f8();
   break;

   case 29:

      func_055e();
   break;

   case 30:

      func_0a98();
   break;

   case 31:

      func_0165();
   break;

   } // end switch

   say( "If there is nothing more, @GS8, I must go now." );
   locals[62] = 33;
   locals[63] = 34;
   locals[64] = 0;
   locals[83] = babl_menu( 0, &locals[62] );
   switch ( locals[83] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "What wouldst thou like to talk about, then?" );
      goto label_088f;

   break;

   } // end switch

} // end func

void func_09b1() {

   private[18][1] = 0;
   private[18][2] = 1;
   private[18][3] = 2;
   private[18][4] = 8;
   private[18][5] = 13;
   private[18][6] = 14;
   private[34] = 0;
   private[35] = 6;
   private[36] = 0;
} // end func

void func_09f8() {

   say( "It has indeed been a hard year for us, Avatar. As thou didst travel the land, doubtless thou didst bear witness to the Guardian's subtle devastation of our land. 'Twill be a few more years yet before Britannia is once again a land fit for heroes to walk." );
} // end func

void func_0a03() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      func_0ae2();
   } else {

      if ( 1 == locals[1] ) {

         func_0b4f();
      } else {

         if ( 2 == locals[1] ) {

            func_0b5a();
         } else {

            if ( 8 == locals[1] ) {

               func_0b65();
            } else {

               if ( 13 == locals[1] ) {

                  func_0c0f();
               } else {

                  if ( 14 == locals[1] ) {

                     func_0c5b();
                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_0a98() {

   int locals[3];

   if ( play_health == 255 ) {

      say( "But thou art unwounded! 'Twere best I save my power for a time of need." );
   } else {

      say( "Of course, Avatar." );
      locals[1] = 39;
      print( 1, &locals[1] );
      locals[2] = 4;
      pause( 1, &locals[2] );
      locals[3] = 40;
      print( 1, &locals[3] );
      say( "I am sorry, Avatar, but it appears that black jewel has nullifed my powers of healing. Thou wilt have to heal thyself naturally." );
      private[76] = 0;
   } // end if

} // end func

void func_0ae2() {

   int locals[24];

   say( "Well, Avatar, I am sorry now I did invite thee to this doomed affair. The Guardian's threats are indeed dire!" );
   locals[1] = 43;
   locals[2] = 44;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0b38;

   break;

   case 2:

   break;

   } // end switch

   locals[23] = 45;
   print( 1, &locals[23] );
   say( "Thou'rt right! Thou dost merely gravitate towards peril, like one of Brion's mystic lodestones towards iron! 'Tis a natural process, I am sure." );
   goto label_0b49;

   label_0b38:;

   locals[24] = 47;
   print( 1, &locals[24] );
   say( "Thou'rt right! I was a fool to think I could keep thee out of danger, for thou'rt e'er plunging thyself in the thick of it!" );
   label_0b49:;

   say( "Listen, thou shouldst speak with Dupre! He mentioned he had seen something which might relate to our current plight!" );
} // end func

void func_0b4f() {

   say( "Avatar, I hear thou hast begun exploring the Undercastle. 'Tis a vast area, and even I do not know its full extent. Be sure to alert Miranda to all of thy movements, lest thou shouldst become lost within its vast extent." );
} // end func

void func_0b5a() {

   say( "I knew my hopes would be justified! Trust the Avatar to take a sealed castle, and discover in it a door to another world. Well done, my friend!" );
} // end func

void func_0b65() {

   int locals[46];

   locals[1] = 52;
   print( 1, &locals[1] );
   say( "Please, Avatar, I would rather not speak with anyone right now." );
   locals[2] = 54;
   locals[3] = 55;
   locals[4] = 0;
   locals[23] = babl_menu( 0, &locals[2] );
   switch ( locals[23] ) {

   case 1:

      func_0156();
   break;

   case 2:

   break;

   } // end switch

   say( "I cannot accept it! A woman murdered, within the walls of my own castle! If I cannot protect an innocent woman here, how can I protect an entire people?" );
   locals[24] = 57;
   locals[25] = 58;
   locals[26] = 0;
   locals[45] = babl_menu( 0, &locals[24] );
   switch ( locals[45] ) {

   case 1:

   break;

   case 2:

      goto label_0c07;

   break;

   } // end switch

   locals[46] = 59;
   print( 1, &locals[46] );
   say( "I suppose thou art right. But mark me, now that the deed is done there shall be justice. I shall have the killer, or rule this land no more!" );
   func_0156();
   label_0c07:;

   say( "Aye. Though we failed in offering her protection, we may still offer vengeance. I shall count on thee, Avatar. Do not fail." );
   func_0147();
} // end func

void func_0c0f() {

   int locals[22];

   say( "I heard the... news about Mayor Patterson. I fear that part of the blame for Nelson's death is mine -- I should never have trusted him after his association with the Fellowship. And yet... after his encounter with you he seemed a changed man, and I believe he really was." );
   locals[1] = 63;
   locals[2] = 64;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0c55;

   break;

   case 2:

   break;

   } // end switch

   say( "No, I think thou art mistaken." );
   label_0c55:;

   say( "It took the Guardian to find his fear, and his lust for power and status, and twist him into something else. Patterson was not a strong man, and the Guardian knew where to push him." );
} // end func

void func_0c5b() {

   int locals[22];

   say( "Avatar, grant me the truth from thine own lips. Thou hast WHAT inside thy body?" );
   locals[1] = 68;
   locals[2] = 69;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      goto label_0ca3;

   break;

   } // end switch

   say( "'Tis a relief. There certainly are strange rumors afoot in this castle." );
   return;

   label_0ca3:;

   say( "Surely, @GS8, this is thy strangest adventure ever!" );
} // end func

void func_0ca9() {

   int locals[90];

   locals[1] = 0;
   locals[2] = 0;
   locals[3] = 115;
   if ( get_quest( 1, &locals[3] ) == 1 ) {

      locals[1] = 1;
   } else {

      locals[2] = 1;
   } // end if

   say( "Avatar, something strange is going on. Just now, I asked Nanna to bring me some ale, and she stalked off without a word!" );
   locals[25] = 1;
   locals[4] = 73;
   locals[26] = locals[1];
   locals[5] = 74;
   locals[27] = locals[2];
   locals[6] = 75;
   locals[7] = 0;
   locals[46] = babl_fmenu( 0, &locals[4], &locals[25] );
   switch ( locals[46] ) {

   case 73:

      goto label_0d49;

   break;

   case 74:

      goto label_0d89;

   break;

   case 75:

      goto label_0d89;

   break;

   } // end switch

   label_0d49:;

   say( "What precisely are they asking for?" );
   locals[47] = 77;
   locals[48] = 78;
   locals[49] = 0;
   locals[68] = babl_menu( 0, &locals[47] );
   switch ( locals[68] ) {

   case 1:

      func_0e44();
   break;

   case 2:

      goto label_0d89;

   break;

   } // end switch

   label_0d89:;

   label_0d89:;

   label_0d89:;

   say( "Nanna... was she not once a member of the Guardian's Fellowship?" );
   locals[69] = 80;
   locals[70] = 81;
   locals[71] = 0;
   locals[90] = babl_menu( 0, &locals[69] );
   switch ( locals[90] ) {

   case 1:

      func_0e44();
   break;

   case 2:

      goto label_0dc9;

   break;

   } // end switch

   label_0dc9:;

   say( "Perhaps so, but I was certain Nanna could be trusted. Perhaps she is in fact sincere. I must think on this." );
   private[74] = 1;
   say( "@GS112" );
   func_0147();
} // end func

void func_0dd9() {

   int locals[22];

   say( "So, Avatar, hast thou come to any new conclusions about our class problems?" );
   locals[1] = 85;
   locals[2] = 86;
   locals[3] = 87;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0e32;

   break;

   case 2:

      goto label_0e37;

   break;

   case 3:

      goto label_0e3c;

   break;

   } // end switch

   label_0e32:;

   say( "Avatar, I am most disappointed -- thou showest thyself a fool! One cannot govern people as if one were driving oxen!" );
   func_0e44();
   label_0e37:;

   say( "I see some justice in thy words, Avatar, although 'tis not easy to change the longstanding order of a society." );
   func_0e44();
   label_0e3c:;

   say( "'Tis true. Yet in this instance the wrath of the aggrieved may well be just, and therefore I cannot ignore or suppress it." );
   func_0e44();
} // end func

void func_0e44() {

   int locals[14];

   if ( private[77] == 0 ) {

      private[77] = x_clock( 2, &locals[2], &locals[1] ) + 1;
      locals[1] = 0;
      locals[2] = 10001;
   } // end if

   (private[77] <= x_clock( 2, &locals[4], &locals[3] ) || private[77] > x_clock( 2, &locals[6], &locals[5] ) + 1);  // expr. has value on stack!
   locals[3] = 0;
   locals[4] = 10001;
   locals[5] = 0;
   if ( locals[6] = 10001 ) {

      locals[7] = 91;
      print( 1, &locals[7] );
      say( "I have made my decision." );
      say( "'Tis a reform too long in coming -- the ordering of our society is an ancient one, and it carries with it many evils which have long gone unrecognized. I shall inform them myself that I find their demands, and their anger, understandable and justified." );
      locals[8] = 300;
      x_exp( 1, &locals[8] );
      private[74] = 0;
      private[82] = 0;
      locals[9] = 115;
      locals[10] = 0;
      set_quest( 2, &locals[10], &locals[9] );
      locals[11] = 116;
      locals[12] = 1;
      set_quest( 2, &locals[12], &locals[11] );
      locals[13] = 114;
      locals[14] = 0;
      set_quest( 2, &locals[14], &locals[13] );
      func_0147();
   } else {

      say( "I must have time, Avatar, to think on the past, and the way of life I have established in Britannia, and whether or not I have been just in my actions." );
      private[74] = 1;
      private[82] = private[82] + 1;
      say( "@GS112" );
      func_0147();
   } // end if

} // end func

void func_0f3b() {

   int locals[22];

   say( "Avatar, thou shouldst speak with Nystul at once -- it is almost time to begin our attack on the Guardian's spell!" );
   locals[1] = 97;
   locals[2] = 98;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0f83;

   break;

   case 2:

      goto label_0f80;

   break;

   } // end switch

   label_0f80:;

   say( "Hurry, then! I can think of nothing more urgent than this." );
   label_0f83:;

   say( "In the meantime, I have instructed the guards to be watchful for this "Mors Gotha" you have described." );
} // end func

void func_0f89() {

   int locals[53];

   npc_goal = 1;
   locals[1] = 109;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "Avatar, I am sorry to see that the shock of the Guardian's assault has gotten the better of thee. I think it best that thou shouldst remain here for the duration of the coming crisis. This time, Britannia will have to undertake its own defense." );
      func_0156();
   } // end if

   if ( private[75] < 4 ) {

      private[75] = private[75] + 1;
      locals[2] = 102;
      print( 1, &locals[2] );
      say( "Avatar? I would speak with thee." );
      locals[3] = 104;
      locals[4] = 105;
      locals[5] = 106;
      locals[6] = 0;
      locals[24] = babl_menu( 0, &locals[3] );
      switch ( locals[24] ) {

      case 1:

         goto label_1025;

      break;

      case 2:

         goto label_1022;

      break;

      case 3:

      break;

      } // end switch

      say( "As the situation stands, thou hast not a choice." );
      goto label_1025;

      label_1022:;

      say( "I suspect thou art right." );
      label_1025:;

      label_1025:;

      say( "Avatar, I and thou know that the burden of protecting a nation is a great one. However, the next time thou dost find the pressure too much to bear, I suggest that thou find some occupation besides brawling with thy friends!" );
      locals[25] = 110;
      locals[26] = 111;
      locals[27] = 0;
      locals[46] = babl_menu( 0, &locals[25] );
      switch ( locals[46] ) {

      case 1:

         goto label_1065;

      break;

      case 2:

         goto label_106a;

      break;

      } // end switch

      label_1065:;

      say( "Now come, thou hast been forgiven. Now let us begin the fight anew!" );
      goto label_107e;

      label_106a:;

      if ( private[75] < 3 ) {

         say( "Try to be more civil in the future, though -- this is all we ask." );
      } else {

         say( "Then I am afraid thou shalt spend it here, and we must continue the fight without thee." );
         func_0156();
      } // end if

      label_107e:;

      locals[47] = 112;
      locals[48] = 0;
      set_quest( 2, &locals[48], &locals[47] );
      locals[49] = 41;
      locals[50] = 38;
      locals[51] = 0;
      gronk_door( 3, &locals[51], &locals[50], &locals[49] );
      locals[52] = 3;
      func_0136( &locals[52] );
   } else {

      say( "Avatar, I have had enough. I sentence thee to remain in this cell for the duration of the Guardian's assault, if not longer. In that time, I suggest thou dost meditate on the path of virtue, and where it was thou didst lose thy way from it." );
      locals[53] = 1;
      func_0136( &locals[53] );
   } // end if

} // end func

conversation #144
string block 0x0e8f, name 

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_067f();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[7];

   locals[2] = 1;
   locals[4] = 0;
   if ( param1[0]play_hunger > 1000 ) {

      play_hunger = param1[0]play_hunger - 1000;
      locals[4] = 1;
   } // end if

} // end if

if ( param1[0]play_hunger != 1 ) {

   locals[2] = locals[2] * 2;
   play_hunger = param1[0]play_hunger - 1;
} else {

   locals[3] = get_quest( 1, &locals[5] );
   locals[5] = 131;
   if ( locals[4] ) {

      if ( locals[3] / locals[2] % 2 == 1 ) {

         locals[1] = 1;
      } else {

         locals[1] = 0;
      } else {

         if ( locals[3] / locals[2] % 2 != 1 ) {

            locals[6] = 131;
            locals[7] = locals[3] + locals[2];
            set_quest( 2, &locals[7], &locals[6] );
            locals[1] = 1;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_0414() {

   int locals[4];

   private[38] = 10000;
   locals[4] = -1;
   locals[2] = 1;
   while ( locals[2] <= private[34] ) {

      locals[3] = func_0518( &private[2][0] );
      switch ( locals[3] ) {

      case 2:

         if ( private[38] != 10000 ) {

         } else {

            private[38] = private[2][0];
            private[72] = locals[2];
            locals[4] = 1;
         break;

      } // end if

      case 3:

         private[37] = private[37] + 1;
         private[39][0] = private[55][0];
         private[2][0] = private[2][0] + 1024;
      break;

      locals[2] = locals[2] + 1;
   } // while

   locals[2] = 1;
   locals[2] <= private[35];  // expr. has value on stack!
   locals[3] = func_0518( &private[18][0] );
   switch ( locals[3] ) {

   case 2:

      if ( private[38] != 10000 ) {

      } else {

         private[38] = private[18][0];
         private[72] = locals[2];
         locals[4] = 0;
      break;

   } // end if

   case 3:

      private[18][0] = private[18][0] + 1024;
   break;

   locals[2] = locals[2] + 1;
   _asm BRA +ffa0 // target: 04a6
   } // end switch

   locals[1] = locals[4];
   goto label_0510;

   label_0510:;

   return locals[1];
} // end func

void func_0518() {

   int locals[10];

   locals[3] = param1[0]play_hunger;
   locals[3] >= 1024;  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   switch ( locals[3] ) {

   case 256:

      locals[4] = locals[3] - 256;
      if ( get_quest( 1, &locals[4] ) ) {

         locals[1] = 2;
      } else {

      break;

      case 64:

         locals[2] = x_clock( 2, &locals[6], &locals[5] );
         locals[5] = 1;
         locals[6] = 10001;
      break;

      locals[3] = locals[3] - 64;
      locals[3] < 64;  // expr. has value on stack!
      locals[2] = x_clock( 2, &locals[8], &locals[7] );
      locals[7] = 2;
      locals[8] = 10001;
      _asm BRA +0037 // target: 05e4
      } // end switch

      locals[3] = locals[3] - 64;
      if ( locals[3] < 64 ) {

         locals[2] = x_clock( 2, &locals[10], &locals[9] );
         locals[9] = 3;
         locals[10] = 10001;
      } else {

         locals[1] = 0;
      } // end if

      if ( locals[2] == locals[3] ) {

         locals[1] = 2;
      } else {

         if ( locals[2] > locals[3] ) {

            locals[1] = 3;
         } else {

            locals[1] = 0;
         } // end if

      } // end if

   } // end if

   return locals[1];
} // end func

void func_0618() {

   int locals[23];

   locals[1] = private[37];
   if ( locals[1] == 0 ) {

      say( "@GS102" );
   } else {

      say( "Well..." );
      say( "@GS70SI1" );
      locals[2] = 4;
      locals[3] = 5;
      locals[4] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

         return;

      break;

      case 2:

      break;

      } // end switch

      locals[1] = locals[1] - 1;
   } // end if

} // end func

void func_067f() {

   int locals[75];

   if ( private[0] == 0 ) {

      func_084f();
      private[37] = 0;
   } // end if

   locals[5] = 109;
   if ( get_quest( 1, &locals[5] ) ) {

   } else {

      say( "I think Lord British has something he wishes to say. Thou shouldst hasten to the throne room." );
      func_0165();
   } // end if

   locals[6] = 110;
   if ( get_quest( 1, &locals[6] ) ) {

      say( "Well, Avatar, if thou hast any final tricks up thy sleeve, now is the time to play them!" );
      func_0156();
   } // end if

   locals[1] = 0;
   locals[2] = 0;
   locals[4] = func_0414();
   locals[3] = private[37] > 0;
   switch ( locals[4] ) {

   case 0:

      private[73] = 0;
   break;

   case 1:

      private[73] = 1;
   break;

   locals[7] = locals[4];
   0 == locals[7];  // expr. has value on stack!
   locals[1] = 1;
   } // end switch

   if ( 1 == locals[7] ) {

      locals[8] = 1;
      func_089b( &locals[8], 69 );
      locals[2] = 1;
   } else {

      if ( private[0] == 0 && locals[2] == 0 ) {

         say( "So thou art here as well." );
      } else {

         if ( locals[1] ) {

            say( "I had been meaning to speak to thee, Avatar." );
         } else {

            say( "Yes, @GS8? What may I do for thee?" );
         } // end if

      } // end if

   } // end if

   label_074a:;

   locals[30] = locals[2];
   locals[9] = 11;
   locals[31] = locals[1];
   locals[10] = 12;
   locals[32] = 1;
   locals[11] = 13;
   locals[33] = locals[3];
   locals[12] = 14;
   locals[34] = 1;
   locals[13] = 15;
   locals[14] = 0;
   locals[51] = babl_fmenu( 0, &locals[9], &locals[30] );
   switch ( locals[51] ) {

   case 11:

      locals[52] = 0;
      func_089b( &locals[52], 69 );
   break;

   case 12:

      locals[53] = 0;
      func_089b( &locals[53], 69 );
   break;

   case 13:

      func_0d1a();
   break;

   case 14:

      func_0618();
   break;

   case 15:

      func_0165();
   break;

   } // end switch

   say( "Art thou finished, Avatar?" );
   locals[54] = 17;
   locals[55] = 18;
   locals[56] = 0;
   locals[75] = babl_menu( 0, &locals[54] );
   switch ( locals[75] ) {

   case 1:

      func_0165();
   break;

   case 2:

      say( "Yes, Avatar?" );
      goto label_074a;

   break;

   } // end switch

} // end func

void func_084f() {

   private[18][1] = 0;
   private[18][2] = 3;
   private[18][3] = 5;
   private[18][4] = 8;
   private[18][5] = 9;
   private[18][6] = 13;
   private[34] = 0;
   private[35] = 6;
   private[36] = 0;
   private[71] = 20;
} // end func

void func_089b() {

   int locals[1];

   if ( param2[0]play_hunger >= 1024 ) {

      play_hunger = param2[0]play_hunger - 1024;
   } // end if

   if ( private[73] ) {

      private[2][0] = private[2][0] + 1024;
   } else {

      private[18][0] = private[18][0] + 1024;
   } // end if

   locals[1] = param2[0]play_hunger;
   if ( 0 == locals[1] ) {

      func_0a3f();
   } else {

      if ( 3 == locals[1] ) {

         func_0b9a();
      } else {

         if ( 5 == locals[1] ) {

            func_0930();
         } else {

            if ( 8 == locals[1] ) {

               func_0ac2();
            } else {

               if ( 9 == locals[1] ) {

                  func_0c07();
               } else {

                  if ( 13 == locals[1] ) {

                     func_0c8a();
                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

void func_0930() {

   int locals[22];

   say( "Avatar, canst we not do something about Patterson?  He is without doubt the most inane fellow I have encountered in my life!" );
   locals[1] = 22;
   locals[2] = 23;
   locals[3] = 24;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_098c();
   break;

   case 2:

      func_0999();
   break;

   case 3:

      func_09a6();
   break;

   } // end switch

} // end func

void func_098c() {

   say( "Is that how the Avatar deals with problems?  Ignore them and hope they vanish by themselves?  If that is thy philosophy, 'tis amazing that thou hast been so successful in the past." );
   func_0147();
} // end func

void func_0999() {

   say( "He hath been a constant pest, and methinks not only to me. Many others have been complaining about him.  If his behavior continues, I shall have stern words for the man." );
   func_09b3();
} // end func

void func_09a6() {

   say( "I dost not care if he means well, @GS8.  Thou dost know what they say of good intentions." );
   func_09b3();
} // end func

void func_09b3() {

   int locals[22];

   locals[1] = 28;
   locals[2] = 29;
   locals[3] = 30;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a0c();
   break;

   case 2:

      func_0a19();
   break;

   case 3:

      func_0a26();
   break;

   } // end switch

} // end func

void func_0a0c() {

   say( "I shall be as harsh as I like, if he continues to pester me." );
   func_0147();
} // end func

void func_0a19() {

   say( "Aye, and done soon." );
   func_0147();
} // end func

void func_0a26() {

   int locals[1];

   locals[1] = 33;
   print( 1, &locals[1] );
   say( "The feeling is mutual, Avatar." );
} // end func

void func_0a3f() {

   int locals[22];

   say( "Well, @GS8, once again thy visit has coincided with calamity.  I cannot say I am surprised." );
   locals[1] = 36;
   locals[2] = 37;
   locals[3] = 38;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0a9b();
   break;

   case 2:

      func_0aa8();
   break;

   case 3:

      func_0ab5();
   break;

   } // end switch

} // end func

void func_0a9b() {

   say( "Civility, like respect, should be earned, Avatar." );
   func_0147();
} // end func

void func_0aa8() {

   say( "I shall do my part, do not worry." );
   func_0147();
} // end func

void func_0ab5() {

   say( "Yes, it does.  History tells us that thou hast always been a harbinger of ill tidings." );
   func_0147();
} // end func

void func_0ac2() {

   int locals[22];

   say( "I am greatly saddened by Lady Tory's death.  She was a good woman." );
   locals[1] = 43;
   locals[2] = 44;
   locals[3] = 45;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b1e();
   break;

   case 2:

      func_0b2b();
   break;

   case 3:

      func_0b38();
   break;

   } // end switch

} // end func

void func_0b1e() {

   say( "I am always wary, @GS8." );
   func_0147();
} // end func

void func_0b2b() {

   say( "Nay, I know nothing of it." );
   func_0b38();
} // end func

void func_0b38() {

   int locals[22];

   say( "Art thou accusing me, Avatar?" );
   locals[1] = 49;
   locals[2] = 50;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0b80();
   break;

   case 2:

      func_0b8d();
   break;

   } // end switch

} // end func

void func_0b80() {

   say( "I was in alone in my room when I heard the shouts of the guards. I am as innocent as thou." );
   func_0147();
} // end func

void func_0b8d() {

   say( "If thou hast any evidence, then come out and make the accusation, but I assure thee that I am guilty of nothing.  I am aware that many are talking of me behind my back, and I would be lying to say it dost not bother me.  @GS8, you of all people should know the dangers of groundless speculation." );
   func_0156();
} // end func

void func_0b9a() {

   int locals[22];

   say( "Avatar, we both know that I have little love for thee. However, for the sake of the others you should know that the Guardian spoke to me last night." );
   locals[1] = 54;
   locals[2] = 55;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0bef();
   break;

   case 2:

      func_0be2();
   break;

   } // end switch

} // end func

void func_0be2() {

   say( "I think that thou shouldst hear this." );
   func_0bef();
} // end func

void func_0bef() {

   int locals[1];

   locals[1] = 2;
   func_035a( &locals[1] );
   say( "He tried to get me to convince thee that thou wouldst best be served by exploring the dungeons of Killorn Keep. I wouldst not attempt it though... it is no doubt some trickery on his part. He was unwise to think that I wouldst betray Britannia." );
   func_0147();
} // end func

void func_0c07() {

   int locals[22];

   say( "So thou hast discovered a river in another world. 'Tis most fortunate for us, that we shall not perish of thirst. Wert thou searching for water, or didst thou stumble across it accidentally?" );
   locals[1] = 59;
   locals[2] = 60;
   locals[3] = 61;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0c63();
   break;

   case 2:

      func_0c70();
   break;

   case 3:

      func_0c7d();
   break;

   } // end switch

} // end func

void func_0c63() {

   say( "I thought as much.  Good fortune seems to be thy constant companion." );
   func_0147();
} // end func

void func_0c70() {

   say( "No, it matters not.  I was simply curious." );
   func_0147();
} // end func

void func_0c7d() {

   say( "Thy modesty is overwhelming, Avatar." );
   func_0147();
} // end func

void func_0c8a() {

   int locals[22];

   say( "All of this time, Patterson was under the Guardian's influence. Hopefully this tragedy will at least quell the unfounded suspicions that so many here have of me." );
   locals[1] = 66;
   locals[2] = 67;
   locals[3] = 68;
   locals[4] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      func_0ce6();
   break;

   case 2:

      func_0cf3();
   break;

   case 3:

      func_0d00();
   break;

   } // end switch

} // end func

void func_0ce6() {

   say( "I will accept them all, starting with thine, but for now thou had best return to your task of freeing us from the Guardian's cage." );
   func_0d0d();
} // end func

void func_0cf3() {

   say( "@GS8, thy dislike for me is ill-disguised. The deaths of Lady Tory and Nelson, and even of Patterson, have afflicted me with ample grief. But I have also had to bear the weight of a dozen unfair judgements, which is not an easy burden to carry. Now leave me, and return to your tasks." );
   func_0156();
} // end func

void func_0d00() {

   say( "Then thou art a fool, Avatar.  I need not stay and listen to further paranoid accusations." );
   func_0d0d();
} // end func

void func_0d0d() {

   say( "Enough have died here already, solely because there was a frightened, vicious fool in our midst. Thou art said to be a hero -- now go about thy heroic business." );
   func_0156();
} // end func

void func_0d1a() {

   say( "The dissolution of the Fellowship didst not change my desire to aid the poor and needy of Britannia. I have continued to run the shelter in Paws, though we are in great need of more funding from Lord British. I fear that soon we may lack the means to offer even the meager services that we currently provide." );
} // end func

could not find string block 0x0e91.
could not load code ...
conversation #147
string block 0x0e92, name Rogwump

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04d9();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[44];

   setup_to_barter( 0 );
   while ( !private[1] ) {

      locals[1] = 1;
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         func_040d();
      break;

      case 2:

         func_0467();
      break;

      case 3:

         do_judgement( 0 );
      break;

      case 4:

         do_decline( 0 );
         private[1] = 1;
      break;

      } // end switch

   } // while

   locals[23] = 5;
   locals[24] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   if ( locals[44] == 1 ) {

      private[1] = 1;
   } // end if

   func_0165();
} // end func

void func_040d() {

   int locals[15];

   locals[0] = -1;
   locals[6] = -1;
   locals[11] = 6;
   locals[12] = 7;
   locals[13] = 8;
   locals[14] = 9;
   locals[15] = 10;
   if ( do_offer( 7, &locals[15], &locals[14], &locals[13], &locals[12], &locals[11], &locals[6], &locals[1] ) ) {

      private[1] = 1;
   } // end if

} // end func

void func_0467() {

   int locals[25];

   say( "Art thou going to take my belongings by force?" );
   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

   break;

   case 2:

      return;

   break;

   } // end switch

   locals[23] = 14;
   locals[24] = 15;
   locals[25] = 16;
   if ( do_demand( 3, &locals[25], &locals[24], &locals[23] ) ) {

      private[1] = 1;
   } else {

      func_0110();
   } // end if

} // end func

void func_04d9() {

   int locals[92];

   if ( private[0] ) {

      say( "What, you again? Phlaah!" );
   } else {

      say( "Hraaawk! Hey, what do you want?" );
   } // end if

   label_04eb:;

   label_04eb:;

   label_04eb:;

   label_04eb:;

   label_04eb:;

   label_04eb:;

   locals[1] = 19;
   locals[2] = 20;
   locals[3] = 21;
   locals[4] = 22;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_0555;

   break;

   case 2:

      goto label_05fb;

   break;

   case 3:

      goto label_0600;

   break;

   case 4:

      goto label_0550;

   break;

   } // end switch

   label_0550:;

   label_0550:;

   say( "Oh sure, go do what you want. You humans have it easy! Hwagggh!" );
   func_0165();
   label_0555:;

   say( "Aaaak ptoo! Can't find our way back home. Gotta fill our time down here with somethin' besides eating and sleeping." );
   locals[23] = 25;
   locals[24] = 26;
   locals[25] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_0550;

   break;

   case 2:

      goto label_0595;

   break;

   } // end switch

   label_0595:;

   say( "Well, phah! I've taken up coughing, hacking, and spitting. If we ever get out of here, I'll win next season's spitting contest for sure." );
   say( "I can spit a good twenty yards, want to see?" );
   locals[45] = 29;
   locals[46] = 30;
   locals[47] = 31;
   locals[48] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

      goto label_05ec;

   break;

   case 2:

      goto label_05f1;

   break;

   case 3:

      goto label_05f6;

   break;

   } // end switch

   label_05ec:;

   say( "Sensitive type, are ya? Well, I guess you are just a human. Phlaagh!" );
   goto label_04eb;

   label_05f1:;

   say( "Guardian? Ptooooey! Can't say I ever heard of 'im." );
   goto label_04eb;

   label_05f6:;

   say( "I'll bet you would. Too bad I'm not going to show you! Harf harf harf harf!" );
   goto label_04eb;

   label_05fb:;

   say( "Oh, not too much. Plenty of fish right here, and I don't have to walk far to find some fine much if I need any. Phauugh!" );
   goto label_04eb;

   label_0600:;

   say( "Hak hak hak! Well, I do have a bit of a cold. But not much of one." );
   locals[67] = 37;
   locals[68] = 38;
   locals[69] = 39;
   locals[70] = 0;
   locals[88] = babl_menu( 0, &locals[67] );
   switch ( locals[88] ) {

   case 1:

      goto label_0654;

   break;

   case 2:

      goto label_06c0;

   break;

   case 3:

      goto label_06c0;

   break;

   } // end switch

   label_0654:;

   say( "Well, it might not do my throat much good. Akkkkkh phlah! But it sure would hit the spot!" );
   locals[89] = 189;
   locals[90] = 1;
   (find_inv( 2, &locals[90], &locals[89] ) || find_inv( 2, &locals[92], &locals[91] ));  // expr. has value on stack!
   locals[91] = 187;
   if ( locals[92] = 1 ) {

      private[2][1] = 189;
      private[2][2] = 187;
      private[2][3] = -1;
      private[6][1] = -1;
      set_likes_dislikes( 2, 37, 33 );
      say( "What'll ya take in trade?" );
      func_035a();
      func_0165();
   } // end if

   goto label_04eb;

   label_06c0:;

   label_06c0:;

   say( "Are you kidding? If I get sick enough, I can spit some really thick ones! Bwaaach phwah!" );
   goto label_04eb;

} // end func

could not find string block 0x0e94.
could not load code ...
could not find string block 0x0e96.
could not find string block 0x0e97.
could not load code ...
conversation #153
string block 0x0e98, name Vorz Ductosnore

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04f0();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[91];

   locals[1] = 32;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "xkxkxkxkxkxkxkxkxkxk..." );
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      say( "zlpnzlzlpnzlzlzlzlpnzlzlzlzlzlzlzlzl..." );
      locals[24] = 6;
      locals[25] = 7;
      locals[26] = 8;
      locals[27] = 0;
      locals[45] = babl_menu( 0, &locals[24] );
      switch ( locals[45] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      label_040f:;

      say( "Pi Gmzjoh Gjti, xf ibsemz lofx zf." );
      locals[46] = 10;
      locals[47] = 11;
      locals[48] = 12;
      locals[49] = 0;
      locals[67] = babl_menu( 0, &locals[46] );
      switch ( locals[67] ) {

      case 1:

         goto label_040f;

      break;

      case 2:

      break;

      case 3:

         func_0165();
      break;

      } // end switch

      locals[68] = 32;
      locals[69] = 1;
      set_quest( 2, &locals[69], &locals[68] );
      say( "I hav now azzimilated your language throo telepathy. Kommunication iz now pozzible." );
   } // end if

   label_047b:;

   label_047b:;

   say( "The Talorid emits a euphonious hum." );
   locals[70] = 15;
   locals[71] = 16;
   locals[72] = 17;
   locals[73] = 18;
   locals[74] = 0;
   locals[91] = babl_menu( 0, &locals[70] );
   switch ( locals[91] ) {

   case 1:

      goto label_04e3;

   break;

   case 2:

      goto label_04e3;

   break;

   case 3:

      goto label_04e8;

   break;

   case 4:

      return;

   break;

   } // end switch

   label_04e3:;

   label_04e3:;

   say( "You muzt state your funktion kode." );
   goto label_047b;

   label_04e8:;

   say( "That iz not a valid funktion kode." );
   goto label_047b;

} // end func

void func_04f0() {

   int locals[264];

   func_035a();
   if ( private[0] ) {

      say( "I am Ductosnore. Zay, I remember you. Kome to hear about Ductosnore dutiez again?" );
      locals[1] = 22;
      locals[2] = 23;
      locals[3] = 0;
      locals[22] = babl_menu( 0, &locals[1] );
      switch ( locals[22] ) {

      case 1:

         goto label_0677;

      break;

      case 2:

         say( "Well, nize to zee you. Kome bak any time." );
         func_0165();
      } // end if

   break;

   } // end switch

   say( "I am Ductosnore. It haz no akkurate tranzlation in your lang-age." );
   locals[23] = 26;
   locals[24] = 27;
   locals[25] = 28;
   locals[26] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

   break;

   } // end switch

   say( "In fakt, I am not juzt any Ductosnore. I am Bliy Skup Ductosnore. Only one there iz." );
   locals[45] = 30;
   locals[46] = 31;
   locals[47] = 32;
   locals[48] = 0;
   locals[66] = babl_menu( 0, &locals[45] );
   switch ( locals[66] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

   break;

   } // end switch

   say( "You know, few ever kome to talk with me. It has been zeveral hundred of your "yearz" zinze the lazt zuch okkassion.  That iz too bad, for my funktion rekires large mental kapazity, thuz I am kapable of lengthy and interesting konverzation." );
   locals[67] = 34;
   locals[68] = 35;
   locals[69] = 36;
   locals[70] = 0;
   locals[88] = babl_menu( 0, &locals[67] );
   switch ( locals[88] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

   break;

   } // end switch

   say( "I'm zure you would like to hear about my funktion. It iz one of the mozt fazkinating and important in all Taloruz." );
   locals[89] = 38;
   locals[90] = 39;
   locals[91] = 40;
   locals[92] = 0;
   locals[110] = babl_menu( 0, &locals[89] );
   switch ( locals[110] ) {

   case 1:

   break;

   case 2:

   break;

   case 3:

   break;

   } // end switch

   label_0677:;

   say( "Skup Chamberz are uzed to produze new Taloridz to replaze thoze that expire through akzident or age. The prozezz kombinez meanz magikal, mekanikal, and biologikal." );
   locals[111] = 42;
   locals[112] = 43;
   locals[113] = 0;
   locals[132] = babl_menu( 0, &locals[111] );
   switch ( locals[132] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "Before leaving the Skup Chamber, the new Talorid haz all the knowledge rekired for itz funktion enkoded into it as well. All thiz iz zupervized by a Ductosnore." );
   locals[133] = 45;
   locals[134] = 0;
   locals[154] = babl_menu( 0, &locals[133] );
   if ( locals[154] == 1 ) {

   } // end if

   say( "But the Bliy Skup Chamber iz spezial! It kontrolz the bazik programming of all other Skup Chambers, containz mazter patternz for all typez of Taloridz. Zo you zee my funktion iz very important." );
   locals[155] = 47;
   locals[156] = 0;
   locals[176] = babl_menu( 0, &locals[155] );
   if ( locals[176] == 1 ) {

   } // end if

   say( "I have zuffizient knowledge of all patternz to repair any flawz in Skup Chamber programming. Thuz my expanded mental kapazitiez." );
   locals[177] = 49;
   locals[178] = 50;
   locals[179] = 0;
   locals[198] = babl_menu( 0, &locals[177] );
   switch ( locals[198] ) {

   case 1:

   break;

   case 2:

      say( "Hmmmm? Now, what waz I zaying? Oh yez." );
   break;

   } // end switch

   say( "Now that Guardian haz helped reduze komplexity of Talorid enkoding by eliminating unneeded karakteriztics, I have much ekzess kapazity left over for other uzez." );
   locals[199] = 53;
   locals[200] = 0;
   locals[220] = babl_menu( 0, &locals[199] );
   if ( locals[220] == 1 ) {

   } // end if

   say( "Before we had three different zexes, far more patternz to know. And many Taloridz had ekzezz and unezezary kapabilitiez. Still, I am glad to have mine." );
   locals[221] = 55;
   locals[222] = 0;
   locals[242] = babl_menu( 0, &locals[221] );
   if ( locals[242] == 1 ) {

   } // end if

   say( "I have developed a zenze of humor. Perhapz you kan appreziate it, being a strange kreature from another world az you are. You zee, thiz door leadz to the Bliy Skup Chamber. But many yearz ago, the "I" fell down from the zign. But inztead of putting it bak, I left it on the floor az a joke. Iz that not funny?" );
   locals[243] = 57;
   locals[244] = 58;
   locals[245] = 59;
   locals[246] = 0;
   locals[264] = babl_menu( 0, &locals[243] );
   switch ( locals[264] ) {

   case 1:

      goto label_07f3;

   break;

   case 2:

      goto label_07ee;

   break;

   case 3:

      goto label_07f3;

   break;

   } // end switch

   label_07ee:;

   say( "I had thought you a being of ekzess mental kapazity like myzelf. It iz a pity I waz miztaken. You had bezt return to your funktion now." );
   func_0165();
   label_07f3:;

   label_07f3:;

   say( "I am glad you think zo. Kome back in a few hundred yearz when I have had time to think up another joke." );
   func_0165();
} // end func

conversation #154
string block 0x0e99, name Bliy Skup Ductosnore

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04f0();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[91];

   locals[1] = 32;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "xkxkxkxkxkxkxkxkxkxk..." );
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      say( "zlpnzlzlpnzlzlzlzlpnzlzlzlzlzlzlzlzl..." );
      locals[24] = 6;
      locals[25] = 7;
      locals[26] = 8;
      locals[27] = 0;
      locals[45] = babl_menu( 0, &locals[24] );
      switch ( locals[45] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      label_040f:;

      say( "Pi Gmzjoh Gjti, xf ibsemz lofx zf." );
      locals[46] = 10;
      locals[47] = 11;
      locals[48] = 12;
      locals[49] = 0;
      locals[67] = babl_menu( 0, &locals[46] );
      switch ( locals[67] ) {

      case 1:

         goto label_040f;

      break;

      case 2:

      break;

      case 3:

         func_0165();
      break;

      } // end switch

      locals[68] = 32;
      locals[69] = 1;
      set_quest( 2, &locals[69], &locals[68] );
      say( "I hav now azzimilated your language throo telepathy. Kommunication iz now pozzible." );
   } // end if

   label_047b:;

   label_047b:;

   say( "The Talorid emits a euphonious hum." );
   locals[70] = 15;
   locals[71] = 16;
   locals[72] = 17;
   locals[73] = 18;
   locals[74] = 0;
   locals[91] = babl_menu( 0, &locals[70] );
   switch ( locals[91] ) {

   case 1:

      goto label_04e3;

   break;

   case 2:

      goto label_04e3;

   break;

   case 3:

      goto label_04e8;

   break;

   case 4:

      return;

   break;

   } // end switch

   label_04e3:;

   label_04e3:;

   say( "You muzt state your funktion kode." );
   goto label_047b;

   label_04e8:;

   say( "That iz not a valid funktion kode." );
   goto label_047b;

} // end func

void func_04f0() {

   int locals[177];

   func_035a();
   say( "I am Vorz Ductosnore." );
   label_04fa:;

   label_04fa:;

   label_04fa:;

   label_04fa:;

   label_04fa:;

   label_04fa:;

   private[2] = get_quest( 1, &locals[1] );
   locals[1] = 35;
   locals[23] = 1;
   locals[2] = 22;
   locals[24] = 1;
   locals[3] = 23;
   locals[25] = private[2];
   locals[4] = 24;
   locals[26] = 1;
   locals[5] = 25;
   locals[6] = 0;
   locals[44] = babl_fmenu( 0, &locals[2], &locals[23] );
   switch ( locals[44] ) {

   case 22:

      goto label_05f4;

   break;

   case 23:

      goto label_063e;

   break;

   case 24:

      goto label_0697;

   break;

   case 25:

      goto label_0595;

   break;

   } // end switch

   label_0595:;

   if ( private[0] ) {

   } else {

      locals[45] = 34;
      if ( get_quest( 1, &locals[45] ) ) {

         say( "Before you go... Iz it true you zeek to know more about Eloemosynator?" );
         locals[46] = 27;
         locals[47] = 29;
         locals[48] = 0;
         locals[67] = babl_menu( 0, &locals[46] );
         switch ( locals[67] ) {

         case 1:

            say( "Ah, my miztake then. " );
         break;

         case 2:

            say( "Yez, I thought zo. Thank you for konfirming it. " );
         } // end if

      } // end if

   break;

   } // end switch

   say( "Be zeeing you." );
   func_0165();
   label_05f4:;

   say( "Vorz are skupped for a variety of taskz. They perform most phyzikal labor on Taloruz, for one thing. They are alzo very effektive kourierz. Their funktion is to free Taloridz for more important thingz." );
   locals[68] = 33;
   locals[69] = 34;
   locals[70] = 0;
   locals[89] = babl_menu( 0, &locals[68] );
   switch ( locals[89] ) {

   case 1:

      goto label_0634;

   break;

   case 2:

      goto label_0639;

   break;

   } // end switch

   label_0634:;

   say( "What elze kan I help you with?" );
   goto label_04fa;

   label_0639:;

   say( "You would have to azk one who doez zuch thingz. I just skup Vorz." );
   goto label_04fa;

   label_063e:;

   say( "Now that iz an interezting zubjekt. The prozezz is zimilar to the way Taloridz are skupped, but much zimpler. Vorz are mucs zimpler kreaturez, after all." );
   locals[90] = 38;
   locals[91] = 0;
   locals[111] = babl_menu( 0, &locals[90] );
   if ( locals[111] == 1 ) {

   } // end if

   say( "Thiz Skup Chamber iz kontrolled by a zingle Delgnizator - over there, on that wall. By konnekting different information krystalz to it, I modify the patternz, enkoding Vorz for whatever funktionz may be rekired." );
   locals[112] = 40;
   locals[113] = 0;
   locals[133] = babl_menu( 0, &locals[112] );
   if ( locals[133] == 1 ) {

   } // end if

   say( "You are welkome." );
   goto label_04fa;

   label_0697:;

   say( "Among other funktionz, Vorz are skupped to neutralize harmful ekzternal entitiez, much like white blood zellz. Are you a harmful alien?" );
   locals[134] = 43;
   locals[135] = 44;
   locals[136] = 45;
   locals[137] = 0;
   locals[155] = babl_menu( 0, &locals[134] );
   switch ( locals[155] ) {

   case 1:

      goto label_06eb;

   break;

   case 2:

      goto label_06f0;

   break;

   case 3:

      goto label_06f5;

   break;

   } // end switch

   label_06eb:;

   say( "Well, you muzt be anyway. Elze why would Vorz attak you?" );
   goto label_04fa;

   label_06f0:;

   say( "I am confuzed now. Thiz data kontradiktz data that Guardian told me. I muzt zeek Data Integrator at firzt oppportunity and rezolve thiz." );
   goto label_04fa;

   label_06f5:;

   say( "Then I muzt skup many more Vorz, before you do harm to Taloruz." );
   locals[156] = 49;
   locals[157] = 50;
   locals[158] = 0;
   locals[177] = babl_menu( 0, &locals[156] );
   switch ( locals[177] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "I muzt perform my funktion, and you muzt perform yourz. That iz way of thingz, even for lowly Vorz. Nothing to grow upzet over." );
   goto label_04fa;

} // end func

conversation #155
string block 0x0e9a, name Data Integrator

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04f0();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[91];

   locals[1] = 32;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "xkxkxkxkxkxkxkxkxkxk..." );
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      say( "zlpnzlzlpnzlzlzlzlpnzlzlzlzlzlzlzlzl..." );
      locals[24] = 6;
      locals[25] = 7;
      locals[26] = 8;
      locals[27] = 0;
      locals[45] = babl_menu( 0, &locals[24] );
      switch ( locals[45] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      label_040f:;

      say( "Pi Gmzjoh Gjti, xf ibsemz lofx zf." );
      locals[46] = 10;
      locals[47] = 11;
      locals[48] = 12;
      locals[49] = 0;
      locals[67] = babl_menu( 0, &locals[46] );
      switch ( locals[67] ) {

      case 1:

         goto label_040f;

      break;

      case 2:

      break;

      case 3:

         func_0165();
      break;

      } // end switch

      locals[68] = 32;
      locals[69] = 1;
      set_quest( 2, &locals[69], &locals[68] );
      say( "I hav now azzimilated your language throo telepathy. Kommunication iz now pozzible." );
   } // end if

   label_047b:;

   label_047b:;

   say( "The Talorid emits a euphonious hum." );
   locals[70] = 15;
   locals[71] = 16;
   locals[72] = 17;
   locals[73] = 18;
   locals[74] = 0;
   locals[91] = babl_menu( 0, &locals[70] );
   switch ( locals[91] ) {

   case 1:

      goto label_04e3;

   break;

   case 2:

      goto label_04e3;

   break;

   case 3:

      goto label_04e8;

   break;

   case 4:

      return;

   break;

   } // end switch

   label_04e3:;

   label_04e3:;

   say( "You muzt state your funktion kode." );
   goto label_047b;

   label_04e8:;

   say( "That iz not a valid funktion kode." );
   goto label_047b;

} // end func

void func_04f0() {

   int locals[23];

   func_035a();
   say( "I am Ductosnore. And am very buzy! Do you need zomething?" );
   label_04fa:;

   label_04fa:;

   label_04fa:;

   locals[1] = 22;
   locals[2] = 23;
   locals[3] = 24;
   locals[4] = 25;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_055f;

   break;

   case 2:

      goto label_0564;

   break;

   case 3:

      goto label_0569;

   break;

   case 4:

      goto label_056e;

   break;

   } // end switch

   label_055f:;

   say( "Nothing iz az my funktion indikatez it should be! All are skupped now by strange new patternz. I muzt restore old patternz to Bliy Skup Chamber, much work to do." );
   goto label_04fa;

   label_0564:;

   say( "I zuppoze you muzt oppoze Guardian, then. Zeemz not all alienz are bad alienz. Thank you for your azziztanze." );
   goto label_04fa;

   label_0569:;

   say( "Yez, Historian kan tell me how thingz were in better timez, then Futurian kan tell me how to help make them zo again." );
   goto label_04fa;

   label_056e:;

   say( "Zo much to do... Where to begin, where to begin!" );
   locals[23] = 750;
   x_exp( 1, &locals[23] );
   func_0165();
} // end func

conversation #156
string block 0x0e9b, name Historian

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04f0();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[91];

   locals[1] = 32;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "xkxkxkxkxkxkxkxkxkxk..." );
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      say( "zlpnzlzlpnzlzlzlzlpnzlzlzlzlzlzlzlzl..." );
      locals[24] = 6;
      locals[25] = 7;
      locals[26] = 8;
      locals[27] = 0;
      locals[45] = babl_menu( 0, &locals[24] );
      switch ( locals[45] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      label_040f:;

      say( "Pi Gmzjoh Gjti, xf ibsemz lofx zf." );
      locals[46] = 10;
      locals[47] = 11;
      locals[48] = 12;
      locals[49] = 0;
      locals[67] = babl_menu( 0, &locals[46] );
      switch ( locals[67] ) {

      case 1:

         goto label_040f;

      break;

      case 2:

      break;

      case 3:

         func_0165();
      break;

      } // end switch

      locals[68] = 32;
      locals[69] = 1;
      set_quest( 2, &locals[69], &locals[68] );
      say( "I hav now azzimilated your language throo telepathy. Kommunication iz now pozzible." );
   } // end if

   label_047b:;

   label_047b:;

   say( "The Talorid emits a euphonious hum." );
   locals[70] = 15;
   locals[71] = 16;
   locals[72] = 17;
   locals[73] = 18;
   locals[74] = 0;
   locals[91] = babl_menu( 0, &locals[70] );
   switch ( locals[91] ) {

   case 1:

      goto label_04e3;

   break;

   case 2:

      goto label_04e3;

   break;

   case 3:

      goto label_04e8;

   break;

   case 4:

      return;

   break;

   } // end switch

   label_04e3:;

   label_04e3:;

   say( "You muzt state your funktion kode." );
   goto label_047b;

   label_04e8:;

   say( "That iz not a valid funktion kode." );
   goto label_047b;

} // end func

void func_04f0() {

   int locals[257];

   locals[1] = 0;
   func_035a();
   say( "I am Data Integrator." );
   label_04ff:;

   label_04ff:;

   label_04ff:;

   label_04ff:;

   label_04ff:;

   label_04ff:;

   if ( locals[1] ) {

      say( "Perhapz Dialogicianz might help you phraze thiz more precizely." );
   } // end if

   locals[1] = 0;
   private[2] = get_quest( 1, &locals[2] );
   locals[2] = 33;
   locals[24] = 1;
   locals[3] = 23;
   locals[25] = 1;
   locals[4] = 24;
   locals[26] = private[2];
   locals[5] = 25;
   locals[27] = 1;
   locals[6] = 26;
   locals[7] = 0;
   locals[45] = babl_fmenu( 0, &locals[3], &locals[24] );
   switch ( locals[45] ) {

   case 23:

      goto label_05a7;

   break;

   case 24:

      goto label_05d6;

   break;

   case 25:

      goto label_0639;

   break;

   case 26:

      func_0165();
   break;

   } // end switch

   label_05a7:;

   say( "There are many zourzez of information, zome komplementary, zome kontradiktory. When a Talorid haz only one pieze of information to akt on, the kourse iz klear. When there are two or more, they kome to me." );
   locals[46] = 28;
   locals[47] = 0;
   locals[67] = babl_menu( 0, &locals[46] );
   if ( locals[67] == 1 ) {

   } // end if

   say( "Uzually my funktion iz in dealing with the kombination of information kryztalz. Of kourze I alzo anzer zimple kestions, az I am doing for you now." );
   goto label_04ff;

   label_05d6:;

   say( "Ekzplaining iz indeed part of my funktion." );
   locals[68] = 31;
   locals[69] = 32;
   locals[70] = 33;
   locals[71] = 0;
   locals[89] = babl_menu( 0, &locals[68] );
   switch ( locals[89] ) {

   case 1:

      goto label_062a;

   break;

   case 2:

      goto label_062f;

   break;

   case 3:

      goto label_0634;

   break;

   } // end switch

   label_062a:;

   say( "Who I am, what I am, and what I do, to me all theze thingz are one, all the zame. Zo it iz with all of uz." );
   goto label_04ff;

   label_062f:;

   say( "One doez not akzezz the information direktly. The kryztalz are uzed to enkode patternz into machinery, zuch az that in the Skup Chamberz. Other machinez kopy patternz from one krystal into another, or manipulate patternz from one or more krystalz to produze a kryztal with a new pattern." );
   goto label_04ff;

   label_0634:;

   say( "Imagine an ant hill where each ant haz bekome az a zingle nerve zell in a giant brain. Kould any ant tell you what the brain wants? And yet, if any would know what shall bekome of uz, it would be Futurian. Zeek Futurian." );
   goto label_04ff;

   label_0639:;

   say( "That iz my spezialty. But you muzt state your rekirementz with utmozt prezizion." );
   label_063c:;

   label_063c:;

   private[3] = find_inv( 2, &locals[91], &locals[90] );
   locals[90] = 309;
   locals[91] = 1;
   if ( private[3] == 0 ) {

   } else {

      locals[92] = 0;
      locals[93] = -1;
      locals[94] = -1;
      locals[95] = -1;
      locals[96] = -1;
      locals[97] = -1;
      locals[98] = -1;
      x_obj_stuff( 9, &locals[98], &locals[97], &locals[96], 33, &locals[95], &locals[94], &locals[93], &locals[92], 34 );
      if ( private[2] == 512 + 96 ) {

      } else {

         locals[99] = 40;
         if ( get_quest( 1, &locals[99] ) == 1 ) {

         } // end if

      } // end if

      private[2] = get_quest( 1, &locals[100] );
      locals[100] = 37;
      locals[122] = 1;
      locals[101] = 38;
      locals[123] = private[2];
      locals[102] = 39;
      locals[124] = private[2];
      locals[103] = 40;
      locals[125] = 1;
      locals[104] = 41;
      locals[105] = 0;
      locals[143] = babl_fmenu( 0, &locals[101], &locals[122] );
      switch ( locals[143] ) {

      case 38:

         goto label_0770;

      break;

      case 39:

         goto label_0775;

      break;

      case 40:

         goto label_0796;

      break;

      case 41:

         goto label_0801;

      break;

      } // end switch

      label_0770:;

      say( "I have no idea which krystalz are stored where. They who zeek me do zo after they have krystalz they need to uze. Librarian kould help you, but there is no Librarian in thiz komplekz." );
      goto label_04ff;

      label_0775:;

      locals[144] = 36;
      locals[145] = 1;
      set_quest( 2, &locals[145], &locals[144] );
      say( "Not nearly prezize enough! There are zo many wayz to kombine the information in two kryztalz, you must tell me how they are to be kombined!" );
      locals[1] = 1;
      goto label_063c;

      label_0796:;

      locals[146] = 36;
      locals[147] = 1;
      set_quest( 2, &locals[147], &locals[146] );
      say( "No, that rekest iz too imprezize. I kannot help you unlezz you kan be more spezifik." );
      locals[1] = 1;
      locals[148] = 45;
      locals[149] = 46;
      locals[150] = 0;
      locals[169] = babl_menu( 0, &locals[148] );
      switch ( locals[169] ) {

      case 1:

         goto label_07f2;

      break;

      case 2:

         goto label_07fc;

      break;

      } // end switch

      label_07f2:;

      say( "Even with proper krystalz, they kan be uzed zo many different wayz! Dependz on how you want patternz interpreted. Muzt be more spezifik." );
      locals[1] = 1;
      goto label_063c;

      label_07fc:;

      say( "I do what I kan." );
      goto label_04ff;

      label_0801:;

      say( "Az you wish." );
   } // end if

   label_0806:;

   locals[170] = 50;
   locals[171] = 51;
   locals[172] = 52;
   locals[173] = 0;
   locals[191] = babl_menu( 0, &locals[170] );
   switch ( locals[191] ) {

   case 1:

      goto label_085c;

   break;

   case 2:

      goto label_0857;

   break;

   case 3:

      goto label_0857;

   break;

   } // end switch

   label_0857:;

   label_0857:;

   say( "Huh?" );
   goto label_0806;

   label_085c:;

   label_085c:;

   label_085c:;

   say( "The information krystal should be plazed in the purple input hopper. Then plaze the Delgnizator in the zentral blue zirkle. The kontroller krystal kan be aktivate in a number of different wayz, depending on the dezired rezult." );
   label_085f:;

   locals[192] = 55;
   locals[193] = 56;
   locals[194] = 57;
   locals[195] = 0;
   locals[213] = babl_menu( 0, &locals[192] );
   switch ( locals[213] ) {

   case 1:

      goto label_085c;

   break;

   case 2:

      goto label_08b5;

   break;

   case 3:

      goto label_08b0;

   break;

   } // end switch

   label_08b0:;

   say( "Huh?" );
   goto label_085f;

   label_08b5:;

   label_08b5:;

   say( "In thiz caze, ekzor rezonanze will okkur at 617 gigamoogz. Thiz kan be achieved by plazing the kontroller krystal in the yellow input hopper." );
   locals[214] = 60;
   locals[215] = 61;
   locals[216] = 62;
   locals[217] = 0;
   locals[235] = babl_menu( 0, &locals[214] );
   switch ( locals[235] ) {

   case 1:

      goto label_085c;

   break;

   case 2:

      goto label_08b5;

   break;

   case 3:

      goto label_0909;

   break;

   } // end switch

   label_0909:;

   say( "When all the komponentz are in plaze, pull the facilitator chain in the korner of the chamber." );
   locals[236] = 64;
   locals[237] = 0;
   locals[257] = babl_menu( 0, &locals[236] );
   if ( locals[257] == 1 ) {

   } // end if

   say( "Zay, if you do all thiz, it should really shake thingz up. The konzekenzez are more komplekz than I kan integrate. I hope Futurian haz worked thiz out zuffiziently. Good luk in any kaze!" );
   func_0165();
} // end func

conversation #157
string block 0x0e9c, name Futurian

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04f0();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[91];

   locals[1] = 32;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "xkxkxkxkxkxkxkxkxkxk..." );
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      say( "zlpnzlzlpnzlzlzlzlpnzlzlzlzlzlzlzlzl..." );
      locals[24] = 6;
      locals[25] = 7;
      locals[26] = 8;
      locals[27] = 0;
      locals[45] = babl_menu( 0, &locals[24] );
      switch ( locals[45] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      label_040f:;

      say( "Pi Gmzjoh Gjti, xf ibsemz lofx zf." );
      locals[46] = 10;
      locals[47] = 11;
      locals[48] = 12;
      locals[49] = 0;
      locals[67] = babl_menu( 0, &locals[46] );
      switch ( locals[67] ) {

      case 1:

         goto label_040f;

      break;

      case 2:

      break;

      case 3:

         func_0165();
      break;

      } // end switch

      locals[68] = 32;
      locals[69] = 1;
      set_quest( 2, &locals[69], &locals[68] );
      say( "I hav now azzimilated your language throo telepathy. Kommunication iz now pozzible." );
   } // end if

   label_047b:;

   label_047b:;

   say( "The Talorid emits a euphonious hum." );
   locals[70] = 15;
   locals[71] = 16;
   locals[72] = 17;
   locals[73] = 18;
   locals[74] = 0;
   locals[91] = babl_menu( 0, &locals[70] );
   switch ( locals[91] ) {

   case 1:

      goto label_04e3;

   break;

   case 2:

      goto label_04e3;

   break;

   case 3:

      goto label_04e8;

   break;

   case 4:

      return;

   break;

   } // end switch

   label_04e3:;

   label_04e3:;

   say( "You muzt state your funktion kode." );
   goto label_047b;

   label_04e8:;

   say( "That iz not a valid funktion kode." );
   goto label_047b;

} // end func

void func_04f0() {

   int locals[428];

   locals[1] = 39;
   if ( get_quest( 1, &locals[1] ) ) {

   } else {

      locals[2] = 38;
      if ( get_quest( 1, &locals[2] ) ) {

      } else {

         func_035a();
         say( "I am Historian." );
      } // end if

      label_0520:;

      label_0520:;

      label_0520:;

      label_0520:;

      label_0520:;

      label_0520:;

      locals[3] = 22;
      locals[4] = 23;
      locals[5] = 24;
      locals[6] = 25;
      locals[7] = 0;
      locals[24] = babl_menu( 0, &locals[3] );
      switch ( locals[24] ) {

      case 1:

         goto label_05e8;

      break;

      case 2:

         goto label_058a;

      break;

      case 3:

         goto label_073d;

      break;

      case 4:

         goto label_0585;

      break;

      } // end switch

      label_0585:;

      say( "Yez, you must zee to prezent and future while I dwell here adrift in memoriez of the past. Go then." );
      func_0165();
      label_058a:;

      say( "After many millenia, the akkumulation of small imperfektionz kauzes a Talorid to show outward zigns such as thiz. Before long I will be zent to the lava pits to have my komponentz reklaimed, and a new Historian will be skupped to replaze me. Zeveral more protruzionz may manifest before then, however." );
      locals[25] = 28;
      locals[26] = 29;
      locals[27] = 30;
      locals[28] = 0;
      locals[46] = babl_menu( 0, &locals[25] );
      switch ( locals[46] ) {

      case 1:

         goto label_05de;

      break;

      case 2:

         goto label_05de;

      break;

      case 3:

         goto label_05e3;

      break;

      } // end switch

      label_05de:;

      label_05de:;

      say( "In timez past, all Taloridz kontinued to funktion until they ekzpired. But Guardian haz taught uz many ways to increaze effizienzy. There have been many changez, thiz is one of them. What waz yesterday, iz today. What will be tomorrow, only Futurian knows." );
      goto label_0520;

      label_05e3:;

      say( "That iz our way now, in theze times of great effizienzy. And yet, I know of older ways, kinder ways we uzed to follow. But I kan only tell of theze ways, it iz for others to akt on that knowledge." );
      goto label_0520;

      label_05e8:;

      say( "To tell of the past is my funktion. Otherz know nothing of what happened before their skupping, zo Historian must make sure it iz not lost. Each new Historian abzorbz knowledge from the one before." );
      locals[47] = 34;
      locals[48] = 35;
      locals[49] = 0;
      locals[68] = babl_menu( 0, &locals[47] );
      switch ( locals[68] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      say( "Zinze you are not of thiz world, I should tell you of our kind first. Our past goez bak far indeed. Just az antz work together in koloniez az one complekz organizm, we Taloridz are evolving toward perfekt zyntheziz into one great zingle being." );
      locals[69] = 37;
      locals[70] = 38;
      locals[71] = 0;
      locals[90] = babl_menu( 0, &locals[69] );
      switch ( locals[90] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      say( "You might think the individual would loze identity, loze what made each of uz spezial. But thiz was not zo, not before he came. Life waz richer az individualz grew more koordinated. Each purzued individual goalz, had hopez and fearz as before. But alzo there were higher goalz, of benefit to all. Lezz pollution, end to war, ekzploration of other dimenzions." );
      locals[91] = 40;
      locals[92] = 41;
      locals[93] = 0;
      locals[112] = babl_menu( 0, &locals[91] );
      switch ( locals[112] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      say( "Guardian came, ekzplained hiz funktion waz to improve zyztems, increaze effizienzy. Made many zuggestionz, ways to increaze produktion of materialz. All were uzed, all worked kite well. But he haz kome to be allowed too much freedom to change our zyztem. He is not of uz, is not Talorid." );
      locals[113] = 43;
      locals[114] = 0;
      locals[134] = babl_menu( 0, &locals[113] );
      if ( locals[134] == 1 ) {

      } // end if

      say( "We are too kompartmentalized now, each knowing only of their own funktion. I think Guardian arranged thiz to weaken uz. Now Guardian kan do az he pleazez. Many of the things we produze now are of no uze to Taloridz, but thoze that make them do not kestion what they are for. Few bezidez myzelf have enough information to zuzpect that Guardian is evil." );
      label_06c9:;

      locals[135] = 45;
      locals[136] = 46;
      locals[137] = 47;
      locals[138] = 48;
      locals[139] = 0;
      locals[156] = babl_menu( 0, &locals[135] );
      switch ( locals[156] ) {

      case 1:

         goto label_072e;

      break;

      case 2:

         goto label_0733;

      break;

      case 3:

         goto label_081d;

      break;

      case 4:

         goto label_0738;

      break;

      } // end switch

      label_072e:;

      say( "It iz not my role to akt, but to inform thoze that kan of what haz gone before. And in time I will be replazed by new Historian, skupped to zee things Guardian'z way." );
      goto label_0520;

      label_0733:;

      say( "Perhapz. But change komez slowly on Taloruz. If it iz a zentury or two before I go to the lava, how much kan I akkomplish in that time? Guardian iz not worried." );
      goto label_06c9;

      label_0738:;

      say( "You are mozt kind." );
      goto label_0520;

      label_073d:;

      private[2] = get_quest( 1, &locals[157] );
      locals[157] = 34;
      say( "Oh? With what do you rekire azzistanze?" );
      locals[179] = 1;
      locals[158] = 53;
      locals[180] = 1;
      locals[159] = 54;
      locals[181] = private[2];
      locals[160] = 55;
      locals[161] = 0;
      locals[200] = babl_fmenu( 0, &locals[158], &locals[179] );
      switch ( locals[200] ) {

      case 53:

         goto label_07bf;

      break;

      case 54:

         goto label_081d;

      break;

      case 55:

         goto label_0818;

      break;

      } // end switch

      label_07bf:;

      say( "I have knowledge of the gem you zeek. But you are not Talorid. If you do zomething to help uz, I will give you the information in return." );
      locals[201] = 57;
      locals[202] = 58;
      locals[203] = 59;
      locals[204] = 0;
      locals[222] = babl_menu( 0, &locals[201] );
      switch ( locals[222] ) {

      case 1:

         goto label_081d;

      break;

      case 2:

         func_0165();
      break;

      case 3:

         goto label_0813;

      break;

      } // end switch

      label_0813:;

      say( "If you are not a helpful kreature, I imagine you'll be eaten by Vorz eventually. Too bad, as I find your converzation interesting." );
      goto label_0520;

      label_0818:;

      say( "Eloemosynator iz most anzient and rezpekted funktion any Talorid kan have." );
      goto label_0520;

      label_081d:;

      label_081d:;

      label_081d:;

      locals[223] = 33;
      if ( get_quest( 1, &locals[223] ) == 1 ) {

         say( "I am Historian, not you. You have already spoken of defeating Guardian, this iz part of history now. It iz my funktion to speak of it, yours iz to go and do it!" );
      } else {

         locals[224] = 33;
         locals[225] = 1;
         set_quest( 2, &locals[225], &locals[224] );
         say( "Kan zuch a think be pozzible? And yet, if it kan, I must do whatever I might to azzist you. Let me think. What in the past might aid you in thiz?" );
         locals[226] = 64;
         locals[227] = 65;
         locals[228] = 0;
         locals[247] = babl_menu( 0, &locals[226] );
         switch ( locals[247] ) {

         case 1:

         break;

         case 2:

         break;

         } // end switch

         say( "Ah, I have it. Several zyklez ago, Guardian modified the programming of the Bliy Skup Chamber. Our kind had three zexez, just az yours haz two. But now we have only one, in the name of greater effizienzy." );
         locals[248] = 67;
         locals[249] = 68;
         locals[250] = 0;
         locals[269] = babl_menu( 0, &locals[248] );
         switch ( locals[269] ) {

         case 1:

         break;

         case 2:

         break;

         } // end switch

         say( "Guardian'z kontrol of our deztiny is zentered on the Bliy Skup Chamber, for through the patterns we are made with, Guardian kan determine our goalz." );
         locals[270] = 70;
         locals[271] = 71;
         locals[272] = 0;
         locals[291] = babl_menu( 0, &locals[270] );
         switch ( locals[291] ) {

         case 1:

         break;

         case 2:

         break;

         } // end switch

         say( "To maintain hiz kontrol, Guardian had Ductosnore skupped that would zee things Guardian'z way. Normal Ductosnore would not operate Bliy Skup Chamber in zuch a manner. Az Historian, I know where information krystal with original Ductosnore pattern iz." );
         locals[292] = 73;
         locals[293] = 0;
         locals[313] = babl_menu( 0, &locals[292] );
         if ( locals[313] == 1 ) {

         } // end if

         say( "It was zent down to the lava pit for rezykling a thouzand of your "yearz" ago." );
         locals[314] = 75;
         locals[315] = 76;
         locals[316] = 0;
         locals[335] = babl_menu( 0, &locals[314] );
         switch ( locals[335] ) {

         case 1:

         break;

         case 2:

         break;

         } // end switch

         say( "Fortunately, the konveyor only movez an inch or two per year. You should be able to find the kryztal amongst the debris to the north of the lava. Iz kryztal E0Y2." );
         locals[336] = 78;
         locals[337] = 79;
         locals[338] = 0;
         locals[357] = babl_menu( 0, &locals[336] );
         switch ( locals[357] ) {

         case 1:

            func_0165();
         break;

         case 2:

         break;

         } // end switch

         say( "That I kannot zay. I only know the past, and Taloruz haz never been rezkued from alien fiend by brave hero before. Only one thing for Historian to zay when zomeone zeekz advize for that which haz never happened before." );
         locals[358] = 81;
         locals[359] = 82;
         locals[360] = 0;
         locals[379] = babl_menu( 0, &locals[358] );
         switch ( locals[379] ) {

         case 1:

         break;

         case 2:

         break;

         } // end switch

         say( "Zeek the Futurian. That which you will do liez in the future, and that iz Futurian'z domain.\m" );
         say( "I wish you luk, Avatar, for hope ridez on your shoulderz. There waz a time when we knew love, and beauty and laughter. I do not know what theze things are, but I would have my people feel them again.\m" );
         say( "Now pleaze go. I grow weary and must rezt." );
      } // end if

      locals[380] = 39;
      locals[381] = 1;
      set_quest( 2, &locals[381], &locals[380] );
      say( "Avatar, you have done it! The new Ductosnore kan restore the old patternz, and free Taloruz from Guardian. I muzt do zomething for you in ekzchange." );
      locals[382] = 87;
      locals[383] = 0;
      locals[403] = babl_menu( 0, &locals[382] );
      if ( locals[403] == 1 ) {

      } // end if

      say( "Guardian uzed powerful magik to make lava pit below. Zervez az power zource for uz. Few know thiz, but at zenter, where spell waz kast, iz small island in middle of lava. There liez gem you zeek." );
      locals[404] = 89;
      locals[405] = 0;
      locals[425] = babl_menu( 0, &locals[404] );
      if ( locals[425] == 1 ) {

      } // end if

      say( "There waz onze a method uzed to teleport Vorz to any dezired lokation. It iz no longer uzed, az it iz not effizient. But az Historian, I still know it. I will zend you to the gem now." );
      locals[426] = 31;
      locals[427] = 35;
      locals[428] = 34;
      teleport_player( 3, &locals[428], &locals[427], &locals[426] );
      func_0165();
   } // end if

   say( ""And thuz did Avatar, the strange kreature from another world, set Taloruz on the path to liberation."" );
   func_0165();
} // end func

conversation #158
string block 0x0e9d, name Eloemosynator

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04f0();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[91];

   locals[1] = 32;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "xkxkxkxkxkxkxkxkxkxk..." );
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      say( "zlpnzlzlpnzlzlzlzlpnzlzlzlzlzlzlzlzl..." );
      locals[24] = 6;
      locals[25] = 7;
      locals[26] = 8;
      locals[27] = 0;
      locals[45] = babl_menu( 0, &locals[24] );
      switch ( locals[45] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      label_040f:;

      say( "Pi Gmzjoh Gjti, xf ibsemz lofx zf." );
      locals[46] = 10;
      locals[47] = 11;
      locals[48] = 12;
      locals[49] = 0;
      locals[67] = babl_menu( 0, &locals[46] );
      switch ( locals[67] ) {

      case 1:

         goto label_040f;

      break;

      case 2:

      break;

      case 3:

         func_0165();
      break;

      } // end switch

      locals[68] = 32;
      locals[69] = 1;
      set_quest( 2, &locals[69], &locals[68] );
      say( "I hav now azzimilated your language throo telepathy. Kommunication iz now pozzible." );
   } // end if

   label_047b:;

   label_047b:;

   say( "The Talorid emits a euphonious hum." );
   locals[70] = 15;
   locals[71] = 16;
   locals[72] = 17;
   locals[73] = 18;
   locals[74] = 0;
   locals[91] = babl_menu( 0, &locals[70] );
   switch ( locals[91] ) {

   case 1:

      goto label_04e3;

   break;

   case 2:

      goto label_04e3;

   break;

   case 3:

      goto label_04e8;

   break;

   case 4:

      return;

   break;

   } // end switch

   label_04e3:;

   label_04e3:;

   say( "You muzt state your funktion kode." );
   goto label_047b;

   label_04e8:;

   say( "That iz not a valid funktion kode." );
   goto label_047b;

} // end func

void func_04f0() {

   int locals[450];

   func_035a();
   locals[1] = 33;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "There are matters for you to discuss with Historian. after that, you will come talk to me again." );
      func_0165();
   } // end if

   say( "I am Futurian. " );
   locals[2] = 37;
   if ( get_quest( 1, &locals[2] ) == 1 ) {

      say( "I knew you would come to speak with me again." );
   } else {

      say( "I presume you'll be wanting to ask about how a new Ductosnore can be skupped with the old patterns." );
      locals[3] = 25;
      locals[4] = 26;
      locals[5] = 0;
      locals[24] = babl_menu( 0, &locals[3] );
      switch ( locals[24] ) {

      case 1:

         goto label_0571;

      break;

      case 2:

         goto label_056c;

      break;

      } // end switch

      label_056c:;

      say( "Oh, perhaps not now, but eventually you will. Good day." );
      func_0165();
      label_0571:;

      say( "You play an important role in the future of Talorus. Normally my guidance is given to my own kind, but in this case it is quite appropriate for me to help you." );
      locals[25] = 29;
      locals[26] = 30;
      locals[27] = 0;
      locals[46] = babl_menu( 0, &locals[25] );
      switch ( locals[46] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      say( "There are three things you will take with you to the Bliy Skup Chamber. First, the information crystal the Historian told you of, with the old Ductosnore pattern. Second, a crystal with the proper program to encode this pattern into the Skup Chamber control mechanisms. This crystal awaits you in the chamber behind me." );
      locals[47] = 32;
      locals[48] = 33;
      locals[49] = 0;
      locals[68] = babl_menu( 0, &locals[47] );
      switch ( locals[68] ) {

      case 1:

         goto label_05ed;

      break;

      case 2:

         goto label_0657;

      break;

      } // end switch

      label_05ed:;

      say( "As Futurian, part of my function is to keep my Necessity Chamber supplied with various items that individuals who come to me will be requiring at some point in the future." );
      locals[69] = 35;
      locals[70] = 36;
      locals[71] = 0;
      locals[90] = babl_menu( 0, &locals[69] );
      switch ( locals[90] ) {

      case 1:

         goto label_0657;

      break;

      case 2:

         goto label_062d;

      break;

      } // end switch

      label_062d:;

      say( "Then one of two things will occur. Either you will return the item before the individual it was placed for comes for it, or you will eventually make use of the item yourself -- possibly many years in the future. Or, actually, it is possible you will convey it to someone who will use it themselves. But we digress." );
      locals[91] = 38;
      locals[92] = 0;
      locals[112] = babl_menu( 0, &locals[91] );
      if ( locals[112] == 1 ) {

      } // end if

      label_0657:;

      label_0657:;

      say( "The third item you will take with you is a Delgnizator. These items, along with some form of weapon, will prove sufficient." );
      locals[113] = 40;
      locals[114] = 41;
      locals[115] = 0;
      locals[134] = babl_menu( 0, &locals[113] );
      switch ( locals[134] ) {

      case 1:

         goto label_0697;

      break;

      case 2:

         goto label_06d7;

      break;

      } // end switch

      label_0697:;

      say( "It is a device designed to serve as part of the control system for a Skup Chamber. You will need it for the reprogramming after you kill Bliy Skup Ductosnore." );
      locals[135] = 43;
      locals[136] = 44;
      locals[137] = 0;
      locals[156] = babl_menu( 0, &locals[135] );
      switch ( locals[156] ) {

      case 1:

         goto label_06d7;

      break;

      case 2:

         goto label_06d7;

      break;

      } // end switch

      label_06d7:;

      label_06d7:;

      label_06d7:;

      say( "The death of Bliy Skup Ductosnore is the only way to gain access to the Bliy Skup Chamber, and to trigger the production of a new Ductosnore." );
      say( "Normally only Ductosnore can open the Chamber doors. But upon death, the chamber begins to produce a new Ductosnore automatically. In addition, the chamber doors open, in case there is some\m" );
      say( "malfunction to be repaired. Otherwise we might be stuck with no Ductosnore, and no way to produce one. But Futurians past anticipated such problems and made allowances." );
      locals[157] = 48;
      locals[158] = 49;
      locals[159] = 0;
      locals[178] = babl_menu( 0, &locals[157] );
      switch ( locals[178] ) {

      case 1:

         goto label_0759;

      break;

      case 2:

         goto label_071d;

      break;

      } // end switch

      label_071d:;

      say( "Your decision to slay Bliy Skup Ductosnore is a key junction between two different futures. In one, Guardian controls Talorus uncontested. In the other, my people begin to struggle for freedom. You will make your choice when the time comes." );
      locals[179] = 51;
      locals[180] = 52;
      locals[181] = 0;
      locals[200] = babl_menu( 0, &locals[179] );
      switch ( locals[200] ) {

      case 1:

      break;

      case 2:

      break;

      } // end switch

      label_0759:;

      say( "The last thing you must know is how to utilize the Delgnizator. The Data Integrator possesses this knowledge; you will acquire it there." );
      locals[201] = 54;
      locals[202] = 0;
      locals[222] = babl_menu( 0, &locals[201] );
      if ( locals[222] == 1 ) {

      } // end if

      say( "There is one other thing you do not strictly need to be informed of. But as your actions will serve to benefit Talorus in the long run, I will warn you." );
      locals[223] = 56;
      locals[224] = 0;
      locals[244] = babl_menu( 0, &locals[223] );
      if ( locals[244] == 1 ) {

      } // end if

      say( "Shortly before you came here, I informed Guardian that your actions would prove detrimental to Guardian's goals. Guardian will increase Vorz production, and modify Vorz encoding to make them attack you. You will experience the first of these attacks fairly soon." );
      locals[245] = 35;
      locals[246] = 1;
      set_quest( 2, &locals[246], &locals[245] );
      func_0322();
      locals[247] = 58;
      locals[248] = 59;
      locals[249] = 60;
      locals[250] = 61;
      locals[251] = 0;
      locals[268] = babl_menu( 0, &locals[247] );
      switch ( locals[268] ) {

      case 1:

         goto label_082e;

      break;

      case 2:

         goto label_082e;

      break;

      case 3:

         goto label_085a;

      break;

      case 4:

         goto label_085f;

      break;

      } // end switch

      label_082e:;

      label_082e:;

      say( "To have lied to Guardian would have led to my demise. In some situations, this would not be inappropriate. But my presence will be important following your actions in the Bliy Skup Chamber, so sacrificing myself was not indicated." );
      locals[269] = 63;
      locals[270] = 0;
      locals[290] = babl_menu( 0, &locals[269] );
      if ( locals[290] == 1 ) {

      } else {

         label_085a:;

         say( "If there had been a good way to avoid it, I would have known of it. This is the way things were destined to transpire." );
      } // end if

      label_085f:;

      say( "I have said all that is needful at this time. Now you shall go and do what you are destined to do." );
      locals[291] = 37;
      locals[292] = 1;
      set_quest( 2, &locals[292], &locals[291] );
      locals[293] = 66;
      locals[294] = 67;
      locals[295] = 0;
      locals[314] = babl_menu( 0, &locals[293] );
      switch ( locals[314] ) {

      case 1:

         func_0165();
      break;

      case 2:

      break;

      } // end switch

      say( "In the future, Talorus has much greater contact with other dimensions, including yours. This eventually leads to greater mastery of alien languages. As Futurian, naturally, I am already attuned to that future state." );
      func_0165();
   } // end if

   locals[315] = 38;
   if ( get_quest( 1, &locals[315] ) ) {

   } else {

      private[2] = 0;
      locals[316] = 174;
      locals[317] = 1;
      if ( find_inv( 2, &locals[317], &locals[316] ) == 0 ) {

         private[2] = 1;
      } // end if

      private[3] = 0;
      if ( private[2] == 0 ) {

      } else {

         locals[318] = 34;
         if ( get_quest( 1, &locals[318] ) ) {

            private[3] = 1;
         } // end if

      } // end if

      label_0918:;

      label_0918:;

      label_0918:;

      label_0918:;

      label_0918:;

      label_0918:;

      label_0918:;

      private[4] = get_quest( 1, &locals[319] );
      locals[319] = 36;
      locals[341] = 1;
      locals[320] = 69;
      locals[342] = private[2];
      locals[321] = 70;
      locals[343] = private[4];
      locals[322] = 71;
      locals[344] = private[3];
      locals[323] = 72;
      locals[345] = 1;
      locals[324] = 73;
      locals[325] = 0;
      locals[362] = babl_fmenu( 0, &locals[320], &locals[341] );
      switch ( locals[362] ) {

      case 69:

         goto label_09d1;

      break;

      case 70:

         goto label_0a1b;

      break;

      case 71:

         goto label_0a20;

      break;

      case 72:

         goto label_0a25;

      break;

      case 73:

         goto label_0a88;

      break;

      } // end switch

      label_09d1:;

      say( "I search through patterns of potentialities to find "the thread which shines most brightly." We have a word for this, but it has no direct translation in your language. Perhaps "destiny" is closest." );
      locals[363] = 75;
      locals[364] = 76;
      locals[365] = 0;
      locals[384] = babl_menu( 0, &locals[363] );
      switch ( locals[384] ) {

      case 1:

         goto label_0a11;

      break;

      case 2:

         goto label_0a16;

      break;

      } // end switch

      label_0a11:;

      say( "As well as you might see, at least." );
      goto label_0918;

      label_0a16:;

      say( "If our kind could smile, such a question could warrant no other response. If you ever learn how time truly functions, you could come ask me that again. But of course, you wouldn't need to." );
      goto label_0918;

      label_0a1b:;

      say( "I already told you that you will obtain a Delgnizator. As you will be removing it from the Skup Chamber where Vorz are produced, this will also terminate the production of hostile Vorz. Thus, the previous information I provided you was sufficient to deal with this issue as well." );
      goto label_0918;

      label_0a20:;

      say( "You will use the scroll supplied by the Dialogicians for that purpose." );
      goto label_0918;

      label_0a25:;

      say( "No, I'm afraid not. For each of us, some things will remain ever mysterious." );
      locals[385] = 82;
      locals[386] = 83;
      locals[387] = 84;
      locals[388] = 0;
      locals[406] = babl_menu( 0, &locals[385] );
      switch ( locals[406] ) {

      case 1:

         goto label_0a79;

      break;

      case 2:

         goto label_0a7e;

      break;

      case 3:

         goto label_0a83;

      break;

      } // end switch

      label_0a79:;

      say( "Indeed, none can know everything." );
      goto label_0918;

      label_0a7e:;

      say( "One does well to let go gracefully of desires that can never be fulfilled." );
      goto label_0918;

      label_0a83:;

      say( "Yes, for I gaze so far into the future, I only have room for small fragments of memories of the past. Most of what I experience is forgotten within a few days time." );
      goto label_0918;

      label_0a88:;

      say( "Yes, you will." );
      func_0165();
   } // end if

   label_0a8d:;

   label_0a8d:;

   label_0a8d:;

   private[4] = 1 - get_quest( 1, &locals[407] );
   locals[407] = 39;
   locals[429] = 1;
   locals[408] = 89;
   locals[430] = private[4];
   locals[409] = 90;
   locals[431] = 1;
   locals[410] = 91;
   locals[432] = 1;
   locals[411] = 92;
   locals[412] = 0;
   locals[450] = babl_fmenu( 0, &locals[408], &locals[429] );
   switch ( locals[450] ) {

   case 89:

      goto label_0b2b;

   break;

   case 90:

      goto label_0b30;

   break;

   case 91:

      goto label_0b35;

   break;

   case 92:

      func_0165();
   break;

   } // end switch

   label_0b2b:;

   say( "You have done well. Great changes lie ahead for Talorus." );
   goto label_0a8d;

   label_0b30:;

   say( "You will speak with Historian again." );
   goto label_0a8d;

   label_0b35:;

   say( "There is much conflict ahead, a complex, tangled clash of conflicting goals and ideas. It will take a long time to resolve. And beyond that? Well, perhaps some things are too far into the future to focus on..." );
   goto label_0a8d;

} // end func

conversation #159
string block 0x0e9e, name Dialogician

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_04f0();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[91];

   locals[1] = 32;
   if ( get_quest( 1, &locals[1] ) == 0 ) {

      say( "xkxkxkxkxkxkxkxkxkxk..." );
      locals[2] = 2;
      locals[3] = 3;
      locals[4] = 4;
      locals[5] = 0;
      locals[23] = babl_menu( 0, &locals[2] );
      switch ( locals[23] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      say( "zlpnzlzlpnzlzlzlzlpnzlzlzlzlzlzlzlzl..." );
      locals[24] = 6;
      locals[25] = 7;
      locals[26] = 8;
      locals[27] = 0;
      locals[45] = babl_menu( 0, &locals[24] );
      switch ( locals[45] ) {

      case 1:

      break;

      case 2:

      break;

      case 3:

      break;

      } // end switch

      label_040f:;

      say( "Pi Gmzjoh Gjti, xf ibsemz lofx zf." );
      locals[46] = 10;
      locals[47] = 11;
      locals[48] = 12;
      locals[49] = 0;
      locals[67] = babl_menu( 0, &locals[46] );
      switch ( locals[67] ) {

      case 1:

         goto label_040f;

      break;

      case 2:

      break;

      case 3:

         func_0165();
      break;

      } // end switch

      locals[68] = 32;
      locals[69] = 1;
      set_quest( 2, &locals[69], &locals[68] );
      say( "I hav now azzimilated your language throo telepathy. Kommunication iz now pozzible." );
   } // end if

   label_047b:;

   label_047b:;

   say( "The Talorid emits a euphonious hum." );
   locals[70] = 15;
   locals[71] = 16;
   locals[72] = 17;
   locals[73] = 18;
   locals[74] = 0;
   locals[91] = babl_menu( 0, &locals[70] );
   switch ( locals[91] ) {

   case 1:

      goto label_04e3;

   break;

   case 2:

      goto label_04e3;

   break;

   case 3:

      goto label_04e8;

   break;

   case 4:

      return;

   break;

   } // end switch

   label_04e3:;

   label_04e3:;

   say( "You muzt state your funktion kode." );
   goto label_047b;

   label_04e8:;

   say( "That iz not a valid funktion kode." );
   goto label_047b;

} // end func

void func_04f0() {

   int locals[90];

   func_035a();
   locals[1] = 1;
   private[2] = 0;
   say( "I am Eloemosynator." );
   locals[2] = 34;
   locals[3] = 1;
   set_quest( 2, &locals[3], &locals[2] );
   label_051b:;

   label_051b:;

   locals[4] = 22;
   locals[5] = 23;
   locals[6] = 24;
   locals[7] = 0;
   locals[25] = babl_menu( 0, &locals[4] );
   switch ( locals[25] ) {

   case 1:

      goto label_05bb;

   break;

   case 2:

      goto label_0571;

   break;

   case 3:

      goto label_056c;

   break;

   } // end switch

   label_056c:;

   say( "That which dizkonnektz in one plaze will rekonnekt in another." );
   func_0165();
   label_0571:;

   say( "There iz komplekzity. In zwirling eddiez of order and chaoz, strandz of information arize spontaneouzly. Zomtimez higher level patternz emerge. By analyzing theze, the obzerver bekomez part of the pattern. Do you komprehend?" );
   locals[26] = 27;
   locals[27] = 28;
   locals[28] = 0;
   locals[47] = babl_menu( 0, &locals[26] );
   switch ( locals[47] ) {

   case 1:

      goto label_05b1;

   break;

   case 2:

      goto label_05b6;

   break;

   } // end switch

   label_05b1:;

   say( "May your understanding grow with the pazzing zyklez." );
   goto label_051b;

   label_05b6:;

   say( "Your knowledge liez elzewhere, then." );
   goto label_051b;

   label_05bb:;

   say( "I have no kestion to ask you." );
   label_05be:;

   label_05be:;

   label_05be:;

   locals[1] = 1 - private[2];
   locals[69] = locals[1];
   locals[48] = 32;
   locals[70] = 1;
   locals[49] = 33;
   locals[71] = private[2];
   locals[50] = 34;
   locals[72] = private[2];
   locals[51] = 35;
   locals[52] = 0;
   locals[90] = babl_fmenu( 0, &locals[48], &locals[69] );
   switch ( locals[90] ) {

   case 32:

      goto label_0652;

   break;

   case 33:

      goto label_065c;

   break;

   case 34:

      goto label_0666;

   break;

   case 35:

      func_0165();
   break;

   } // end switch

   label_0652:;

   private[2] = 1;
   say( "Funktion kode "Guardian" iz uzed to refer to ekztremely denze information pattern which iz lokal ekztenzion of ekztra-dimensional conglomerazion." );
   goto label_05be;

   label_065c:;

   private[2] = 1;
   say( "Without proper konstraintz upon data, zearch time rizez ekzponenzially. One muzt uze limitz that kalify an achievable objektive, but one that still haz value. And yet, thoze limitz themzelvez are data which one muzt zeek, leading to potenzial infinite regrezz." );
   goto label_05be;

   label_0666:;

   say( "Kaoz iz a natural state, juzt az much zo az order. There iz no need to zeek one over the other." );
   goto label_05be;

} // end func

conversation #160
string block 0x0e9f, name Runekeeper

converting to graph
searching functions
replacing expression opcodes
folding expressions
adding control structures
fixing up functions
extern int private[31];

void main() {

   private[1] = 0;
   func_035a();
   func_0012();
} // end func

void func_0012() {

   private[0] = 1;
} // end func

void func_0020() {

   int locals[2];

   locals[2] = 4;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_003a;

   label_003a:;

   return locals[1];
} // end func

void func_0042() {

   int locals[1];

   locals[1] = 0;
   babl_hack( 1, &locals[1] );
} // end func

void func_0058() {

   int locals[2];

   locals[2] = 1;
   locals[1] = babl_hack( 1, &locals[2] );
   goto label_0072;

   label_0072:;

   return locals[1];
} // end func

void func_007a() {

   int locals[1];

   if ( (((npc_goal == 5 || npc_goal == 6) || npc_goal == 9) && npc_gtarg == 1 || npc_attitude == 0) ) {

      locals[1] = 0;
   } else {

      locals[1] = 1;
   } // end if

   return locals[1];
} // end func

void func_00bd() {

   int locals[2];

   locals[1] = 1;
   locals[2] = 2;
   x_obj_pos( 5, param1, param2, param3, &locals[2], &locals[1] );
} // end func

void func_00e8() {

   npc_gtarg = 1;
   npc_attitude = 1;
   npc_goal = 6;
   func_0012();
} // end func

void func_0101() {

   npc_goal = 1;
   func_0012();
} // end func

void func_0110() {

   npc_gtarg = 1;
   npc_goal = 5;
   npc_attitude = 1;
   func_0012();
} // end func

void func_0129() {

   npc_attitude = 6;
} // end func

void func_0136() {

   npc_attitude = param1[0]play_hunger;
   func_0012();
} // end func

void func_0147() {

   npc_attitude = 2;
   func_0012();
} // end func

void func_0156() {

   npc_attitude = 1;
   func_0012();
} // end func

void func_0165() {

   func_0012();
} // end func

void func_016f() {

   param1[1] = game_days;
   param1[2] = game_mins;
} // end func

void func_018b() {

   int locals[4];

   locals[2] = game_days - param2[1];
   locals[3] = game_mins - param2[2];
   if ( locals[3] < 0 ) {

      locals[3] = locals[3] + 1440;
      locals[2] = locals[2] - 1;
   } // end if

   if ( locals[2] >= param1[1] && locals[3] >= param1[2] ) {

      locals[1] = 1;
   } else {

      locals[1] = 0;
   } // end if

   return locals[1];
} // end func

void func_0214() {

   param1[1] = game_days - param3[1];
   param1[2] = game_mins - param3[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

   param1[1] = param2[1] - param1[1];
   param1[2] = param2[2] - param1[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_02c8() {

   param1[1] = game_days - param2[1];
   param1[2] = game_mins - param2[2];
   if ( param1[2] < 0 ) {

      param1[2] = param1[2] + 1440;
      param1[1] = param1[1] - 1;
   } // end if

} // end func

void func_0322() {

   int locals[4];

   locals[1] = 15;
   locals[2] = 15;
   locals[3] = 10001;
   locals[4] = x_clock( 2, &locals[3], &locals[2] ) + 1;
   x_clock( 2, &locals[4], &locals[1] );
} // end func

void func_035a() {

   int locals[202];

   if ( private[0] ) {

   } else {

      say( ""Then we shall increaze orbomite shipmentz to your zektor.\n"
      """ );
      say( ""That would be most ekzellent."\n"
      "" );
      say( ""Have the alt flay rodz been behaving properly?"\m" );
      say( "...\m" );
      say( "Look, an alien kreature wishez to speak with uz." );
      say( "But dialog iz for two, and that would make three!\m" );
      say( "I have a notion. Let uz kontinue our work, and speak with the kreature in between, thuz inventing "trialog"." );
      say( "A splendid notion! You are most klever.\m" );
      say( "I am Dialogician.\n"
      "" );
      say( "I am Dialogician.\n"
      "" );
      goto label_038b;

      label_0386:;

      label_0386:;

      label_0386:;

      label_0386:;

      label_0386:;

      label_0386:;

      label_0386:;

      label_0386:;

      label_0386:;

      label_0386:;

      label_0386:;

      say( "\m" );
   } // end if

   func_06e6();
   label_038b:;

   label_038b:;

   locals[1] = 12;
   locals[2] = 13;
   locals[3] = 14;
   locals[4] = 15;
   locals[5] = 0;
   locals[22] = babl_menu( 0, &locals[1] );
   switch ( locals[22] ) {

   case 1:

      goto label_03f0;

   break;

   case 2:

      goto label_03f5;

   break;

   case 3:

      goto label_0474;

   break;

   case 4:

      goto label_06ad;

   break;

   } // end switch

   label_03f0:;

   say( "My, how formal!" );
   goto label_0386;

   label_03f5:;

   say( "When it is nezezzary for Taloridz to speak with each other, they often lak the ability to think of the proper thingz to say." );
   say( "Yez, zo we provide them with phrazez and zentenzez to suit their needz." );
   say( "Our storage room iz full of them. Feel free to try out a few.\m" );
   func_06e6();
   say( "The thingz we zay to each other, thoze are linez of dialog we are tezting out between each other, before providing them to otherz." );
   say( "Indeed, that iz why there are two of uz. Letz try out zome more linez now.\m" );
   func_06e6();
   locals[23] = 22;
   locals[24] = 23;
   locals[25] = 24;
   locals[26] = 0;
   locals[44] = babl_menu( 0, &locals[23] );
   switch ( locals[44] ) {

   case 1:

      goto label_0459;

   break;

   case 2:

      goto label_0461;

   break;

   case 3:

      goto label_046c;

   break;

   } // end switch

   label_0459:;

   say( "Yez, more and more Taloridz are bekoming zo well adapted to their funktionz that they have no mental rezourzez left for thingz zuch az being artikulate." );
   say( "All the more for uz to do that way!" );
   goto label_0386;

   label_0461:;

   say( "No, no, no, that iz not very good at all." );
   say( "Better would be, perhapz, "I thank you for sharing zuch fazinating information with me!"" );
   say( "Yez, the way you zaid it waz much too short." );
   goto label_0386;

   label_046c:;

   say( "Ah, knowing that iz mozt important part of being Dialogician." );
   say( "To be prezize, if we didn't know, we'd be zomething else entirely." );
   goto label_0386;

   label_0474:;

   say( "That kould mean "Is there zome thing, any thing at all, we kould help you with?"" );
   say( "To that, we would zurely anzer in the affirmative.\m" );
   say( "Or you might have zome spezifik thing in mind.\m" );
   say( "Then we would have to know which thing it waz.\m" );
   say( "Yez, zome thingz we kan help with, while otherz we kannot.\m" );
   func_06e6();
   private[3] = get_quest( 1, &locals[45] );
   locals[45] = 36;
   private[4] = get_quest( 1, &locals[46] );
   locals[46] = 34;
   locals[68] = 1;
   locals[47] = 37;
   locals[69] = 1;
   locals[48] = 38;
   locals[70] = private[3];
   locals[49] = 39;
   locals[71] = private[4];
   locals[50] = 40;
   locals[51] = 0;
   locals[89] = babl_fmenu( 0, &locals[47], &locals[68] );
   switch ( locals[89] ) {

   case 37:

      goto label_0533;

   break;

   case 38:

      goto label_053b;

   break;

   case 39:

      goto label_05a2;

   break;

   case 40:

      goto label_065d;

   break;

   } // end switch

   label_0533:;

   say( "No, most certainly not." );
   say( "To be prezize, we kannot provide the slightezt azziztanze with zuch matterz." );
   goto label_0386;

   label_053b:;

   say( "Good kestion! I might zay "How are you zo blezzed az to be Dialogician?"\m" );
   say( "While I might say "How many granulez are in freemik pulzony?"" );
   locals[90] = 45;
   locals[91] = 46;
   locals[92] = 47;
   locals[93] = 0;
   locals[111] = babl_menu( 0, &locals[90] );
   switch ( locals[111] ) {

   case 1:

      goto label_0386;

   break;

   case 2:

      goto label_0592;

   break;

   case 3:

      goto label_0597;

   break;

   } // end switch

   label_0592:;

   say( "Zome are lukky enough to be skupped for the mozt spezial funktionz, I zuppoze." );
   goto label_0386;

   label_0597:;

   say( "Yez, how many are there?\n"
      "" );
   say( "Why, 602, I believe.\n"
      "" );
   say( "Oh, how interezting." );
   goto label_0386;

   label_05a2:;

   say( "Ah, now it happenz we have a skroll with juzt the zentenzez you need for that." );
   say( "Indeed, Futurian told uz it would be uzeful to prepare zuch a skroll.\m" );
   func_06e6();
   locals[112] = 54;
   locals[113] = 56;
   locals[114] = 0;
   locals[133] = babl_menu( 0, &locals[112] );
   switch ( locals[133] ) {

   case 1:

      say( "It waz our pleazure to prepare it." );
      goto label_0386;

   break;

   case 2:

   break;

   } // end switch

   say( "Yez, having azertained that we kan help you, the nekzt step iz to inkire az to whether we will. kite korrect of you." );
   say( "And in fakt, az it iz our funktion to provide such skrollz, we will give it to you.\m" );
   say( "Here you are." );
   locals[134] = 309;
   take_from_npc( 1, &locals[134] );
   locals[135] = 40;
   locals[136] = 1;
   set_quest( 2, &locals[136], &locals[135] );
   locals[137] = 60;
   locals[138] = 61;
   locals[139] = 0;
   locals[158] = babl_menu( 0, &locals[137] );
   switch ( locals[158] ) {

   case 1:

   break;

   case 2:

   break;

   } // end switch

   say( "To fulfill one'z funktion is to be fulfilled.\m" );
   say( "To be precise: When one iz filled, one feelz funky.\n"
      "" );
   say( "I don't think that iz kite right.\n"
      "" );
   say( "No, I muzt work on that line some more.\n"
      "" );
   goto label_038b;

   label_065d:;

   say( "Yez, we kan help with that.\m" );
   say( "With that we kould be mozt helpful." );
   locals[159] = 68;
   locals[160] = 69;
   locals[161] = 0;
   locals[180] = babl_menu( 0, &locals[159] );
   switch ( locals[180] ) {

   case 1:

      goto label_06a0;

   break;

   case 2:

      goto label_06a8;

   break;

   } // end switch

   label_06a0:;

   say( "No, not at thiz time.\m" );
   say( "In other wordz, we kould help, but we will not." );
   goto label_0386;

   label_06a8:;

   say( "Your reazzuranze is our finezt reward." );
   goto label_0386;

   label_06ad:;

   func_06e6();
   locals[181] = 73;
   locals[182] = 0;
   locals[202] = babl_menu( 0, &locals[181] );
   if ( locals[202] == 1 ) {

   } // end if

   func_06e6();
   say( "" );
   say( "Oh, excuse us." );
   say( "Yes, indeed, farewell strange kreature." );
   func_0165();
} // end func

void func_06e6() {

   int locals[4];

   private[2] = random( 1, &locals[1] );
   locals[1] = 19;
   locals[2] = private[2];
   if ( 1 == locals[2] ) {

      say( ""No, zurely Eloemosynator could not have done such a thing."\n"
      "" );
      locals[3] = 34;
      locals[4] = 1;
      set_quest( 2, &locals[4], &locals[3] );
      say( ""But I tell you, that iz ekzaktly what tranzpired."\m" );
   } else {

      if ( 2 == locals[2] ) {

         say( ""Tell me, iz it a very painful prozezz?"\n"
      "" );
         say( ""Yez, but only the firzt few timez."\m" );
      } else {

         if ( 3 == locals[2] ) {

            say( ""The coleus have grown kite rapidly thiz zykle."\n"
      "" );
            say( ""I do what little I kan to enkourage their growth."\m" );
         } else {

            if ( 4 == locals[2] ) {

               say( ""Zycle 17, zub-zector 3, parts 223a and 227b."\n"
      "" );
               say( ""87 percent, retro-kotient 3.14159."\m" );
            } else {

               if ( 5 == locals[2] ) {

                  say( ""Zurely no more effizient method kan be found."\n"
      "" );
                  say( ""Ask Guardian; if there iz a better way, Guardian will know."\m" );
               } else {

                  if ( 6 == locals[2] ) {

                     say( ""If you fold it thuzly, thiz part becomez the tail."\n"
      "" );
                     say( ""I lack the dekzterity for zuch manipulationz."\m" );
                  } else {

                     if ( 7 == locals[2] ) {

                        say( ""I zeek Philozophizt."\n"
      "" );
                        say( ""That funktion no longer ekziztz. Were you skupped at the dawn of time?"\m" );
                     } else {

                        if ( 8 == locals[2] ) {

                           say( ""Kan you manufakture a frobulus?"\n"
      "" );
                           say( ""Yes. But tell me, what iz a frobulus?"\m" );
                        } else {

                           if ( 9 == locals[2] ) {

                              say( ""I will be rezykled zoon."\n"
      "" );
                              say( ""Kongratulationz on zerving your funktion well."\m" );
                           } else {

                              if ( 10 == locals[2] ) {

                                 say( ""What kolorz are rekired at thiz time?"\n"
      "" );
                                 say( ""Blak, zilver, and gold."\m" );
                              } else {

                                 if ( 11 == locals[2] ) {

                                    say( ""Thiz iz the new method I have devized."\n"
      "" );
                                    say( ""It iz zomewhat ineffizient, but klever nonthelezz."\m" );
                                 } else {

                                    if ( 12 == locals[2] ) {

                                       say( ""I enkountered a referenze to 'art'. What iz 'art'?"\n"
      "" );
                                       say( ""It iz a thing from the pazt. Zeek Historian."\m" );
                                    } else {

                                       if ( 13 == locals[2] ) {

                                          say( ""Waz magik gem dealt with properly?"\n"
      "" );
                                          say( ""Guardian took it to an appropriate plaze."\m" );
                                       } else {

                                          if ( 14 == locals[2] ) {

                                             say( ""I would like to vizit another dimenzion zomeday."\n"
      "" );
                                             say( ""Zuch thoughtz are premature. Get your gnoz out of the fribbery."\m" );
                                          } else {

                                             if ( 15 == locals[2] ) {

                                                say( ""Iz the interzektion of theze kategoriez an ill-formed zet?"\n"
      "" );
                                                say( ""That kestion iz not zolvable in polynomial time."\m" );
                                             } else {

                                                if ( 16 == locals[2] ) {

                                                   say( ""If kozmoz were shaped that way, korioliz effect would work differently."\n"
      "" );
                                                   say( ""Perhapz korioliz theory needz to be modified alzo."\m" );
                                                } else {

                                                   if ( 17 == locals[2] ) {

                                                      say( ""The zubjekt I kame to dizkuzz is no longer relevant."\n"
      "" );
                                                      say( ""Then I need zay nothing to you at all. Goodbye."\m" );
                                                   } else {

                                                      if ( 18 == locals[2] ) {

                                                         say( ""It should be moved zome diztanze to the zouth."\n"
      "" );
                                                         say( ""I believe you are korrekt. What diztanze would be optimum?"\m" );
                                                      } else {

                                                         if ( 19 == locals[2] ) {

                                                            say( ""What kestion kontainz the word 'armadillo' for no apparent reazon?"\n"
      "" );
                                                            say( ""What kestion kontainz the word 'armadillo' for no apparent reazon?"\m" );
                                                         } // end if

                                                      } // end if

                                                   } // end if

                                                } // end if

                                             } // end if

                                          } // end if

                                       } // end if

                                    } // end if

                                 } // end if

                              } // end if

                           } // end if

                        } // end if

                     } // end if

                  } // end if

               } // end if

            } // end if

         } // end if

      } // end if

   } // end if

} // end func

could not find string block 0x0ea1.
could not find string block 0x0ea2.
could not find string block 0x0ea3.
could not find string block 0x0ea4.
could not find string block 0x0ea5.
could not find string block 0x0ea6.
could not find string block 0x0ea7.
could not load code ...
could not find string block 0x0ea9.
could not find string block 0x0eaa.
could not find string block 0x0eab.
could not find string block 0x0eac.
could not find string block 0x0ead.
could not find string block 0x0eae.
could not find string block 0x0eaf.
could not find string block 0x0eb0.
could not find string block 0x0eb1.
could not find string block 0x0eb2.
could not find string block 0x0eb3.
could not find string block 0x0eb4.
could not find string block 0x0eb5.
could not find string block 0x0eb6.
could not find string block 0x0eb7.
could not find string block 0x0eb8.
could not find string block 0x0eb9.
could not find string block 0x0eba.
could not find string block 0x0ebb.
could not find string block 0x0ebc.
could not find string block 0x0ebd.
could not find string block 0x0ebe.
could not find string block 0x0ebf.
could not find string block 0x0ec0.
could not find string block 0x0ec1.
could not find string block 0x0ec2.
could not find string block 0x0ec3.
could not find string block 0x0ec4.
could not find string block 0x0ec5.
could not find string block 0x0ec6.
could not find string block 0x0ec7.
could not find string block 0x0ec8.
could not find string block 0x0ec9.
could not find string block 0x0eca.
could not find string block 0x0ecb.
could not find string block 0x0ecc.
could not find string block 0x0ecd.
could not find string block 0x0ece.
could not find string block 0x0ecf.
could not find string block 0x0ed0.
could not find string block 0x0ed1.
could not find string block 0x0ed2.
could not find string block 0x0ed3.
could not find string block 0x0ed4.
could not find string block 0x0ed5.
could not find string block 0x0ed6.
could not find string block 0x0ed7.
could not find string block 0x0ed8.
could not find string block 0x0ed9.
could not find string block 0x0eda.
could not find string block 0x0edb.
could not find string block 0x0edc.
could not find string block 0x0edd.
could not find string block 0x0ede.
could not find string block 0x0edf.
could not find string block 0x0ee0.
could not find string block 0x0ee1.
could not find string block 0x0ee2.
could not find string block 0x0ee3.
could not find string block 0x0ee4.
could not find string block 0x0ee5.
could not find string block 0x0ee6.
could not find string block 0x0ee7.
could not find string block 0x0ee8.
could not find string block 0x0ee9.
could not find string block 0x0eea.
could not find string block 0x0eeb.
could not find string block 0x0eec.
could not find string block 0x0eed.
could not find string block 0x0eee.
could not find string block 0x0eef.
could not find string block 0x0ef0.
could not find string block 0x0ef1.
could not find string block 0x0ef2.
could not find string block 0x0ef3.
could not find string block 0x0ef4.
could not find string block 0x0ef5.
could not find string block 0x0ef6.
could not find string block 0x0ef7.
could not find string block 0x0ef8.
could not find string block 0x0ef9.
could not find string block 0x0efa.
could not find string block 0x0efb.
could not find string block 0x0efc.
could not find string block 0x0efd.
could not find string block 0x0efe.
could not find string block 0x0eff.
could not find string block 0x0f00.
could not find string block 0x0f01.
could not find string block 0x0f02.
could not find string block 0x0f03.
could not find string block 0x0f04.
could not find string block 0x0f05.
could not find string block 0x0f06.
could not find string block 0x0f07.
could not find string block 0x0f08.
could not find string block 0x0f09.
could not find string block 0x0f0a.
could not find string block 0x0f0b.
could not find string block 0x0f0c.
could not find string block 0x0f0d.
could not find string block 0x0f0e.
could not find string block 0x0f0f.
could not find string block 0x0f10.
could not find string block 0x0f11.
could not find string block 0x0f12.
could not find string block 0x0f13.
could not find string block 0x0f14.
could not find string block 0x0f15.
could not find string block 0x0f16.
could not find string block 0x0f17.
could not find string block 0x0f18.
could not find string block 0x0f19.
could not find string block 0x0f1a.
could not find string block 0x0f1b.
could not find string block 0x0f1c.
could not find string block 0x0f1d.
could not find string block 0x0f1e.
could not find string block 0x0f1f.
could not find string block 0x0f20.
could not find string block 0x0f21.
could not find string block 0x0f22.
could not find string block 0x0f23.
could not find string block 0x0f24.
could not find string block 0x0f25.
could not find string block 0x0f26.
could not find string block 0x0f27.
could not find string block 0x0f28.
could not find string block 0x0f29.
could not find string block 0x0f2a.
could not find string block 0x0f2b.
could not find string block 0x0f2c.
could not find string block 0x0f2d.
could not find string block 0x0f2e.
could not find string block 0x0f2f.
could not find string block 0x0f30.
could not find string block 0x0f31.
could not find string block 0x0f32.
could not find string block 0x0f33.
could not find string block 0x0f34.
could not find string block 0x0f35.
could not find string block 0x0f36.
could not find string block 0x0f37.
could not find string block 0x0f38.
could not find string block 0x0f39.
could not find string block 0x0f3a.
could not find string block 0x0f3b.
could not find string block 0x0f3c.
could not find string block 0x0f3d.
could not find string block 0x0f3e.
could not find string block 0x0f3f.
could not find string block 0x0f40.
